mirror of
https://github.com/Difegue/Karen
synced 2025-01-07 03:17:11 +08:00
Wrap WSL distro uninstall to avoid installer crashes
This commit is contained in:
parent
b653815ddf
commit
216471b2ae
@ -133,8 +133,15 @@ namespace Setup
|
||||
return session.HandleErrors(() =>
|
||||
{
|
||||
session.Log("Removing previous WSL Distro");
|
||||
var wslProc = Process.Start("wslconfig.exe", "/unregister lanraragi");
|
||||
wslProc.WaitForExit();
|
||||
try {
|
||||
var wslProc = Process.Start("wslconfig.exe", "/unregister lanraragi");
|
||||
wslProc.WaitForExit();
|
||||
} catch (Exception e)
|
||||
{
|
||||
// Just log the error. We don't want to crash the uninstaller because of this.
|
||||
session.Log("Error while removing WSL Distro: " + e.Message);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user