mirror of
https://github.com/Difegue/Karen
synced 2025-01-08 11:58:02 +08:00
Fix encoding in DistroInstaller as well
This commit is contained in:
parent
6e66481d86
commit
eb529fc43b
@ -139,14 +139,21 @@ namespace LANraragi.DistroInstaller
|
||||
FileName = "wsl.exe",
|
||||
Arguments = arguments,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = false,
|
||||
RedirectStandardOutput = true,
|
||||
StandardOutputEncoding = Encoding.Unicode,
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
};
|
||||
// Write stdout of process to our own
|
||||
wslProc.OutputDataReceived += (sender, e) => Console.WriteLine(e.Data);
|
||||
|
||||
wslProc.Start();
|
||||
wslProc.WaitForExit((int)TimeSpan.FromMinutes(5).TotalMilliseconds);
|
||||
|
||||
Console.WriteLine("Exit code of wsl.exe is " + wslProc.ExitCode);
|
||||
if (wslProc.HasExited)
|
||||
Console.WriteLine("Exit code of wsl.exe is " + wslProc.ExitCode);
|
||||
else
|
||||
Console.WriteLine("wsl.exe did not exit within 5 minutes, moving on.");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -173,10 +180,14 @@ namespace LANraragi.DistroInstaller
|
||||
FileName = "wsl.exe",
|
||||
Arguments = arguments,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = false,
|
||||
RedirectStandardOutput = true,
|
||||
StandardOutputEncoding = Encoding.Unicode,
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
};
|
||||
// Write stdout of process to our own
|
||||
wslProc.OutputDataReceived += (sender, e) => Console.WriteLine(e.Data);
|
||||
|
||||
wslProc.Start();
|
||||
wslProc.WaitForExit((int)TimeSpan.FromMinutes(1).TotalMilliseconds);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user