mirror of
https://github.com/Difegue/Karen
synced 2025-01-07 03:17:11 +08:00
Show wsl.exe messages clearly in DistroInstaller
This commit is contained in:
parent
6056caa915
commit
ad8e424c2f
@ -140,14 +140,18 @@ namespace LANraragi.DistroInstaller
|
||||
Arguments = arguments,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
StandardOutputEncoding = Encoding.Unicode,
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
};
|
||||
// Write stdout of process to our own
|
||||
wslProc.OutputDataReceived += (sender, e) => Console.WriteLine(e.Data);
|
||||
wslProc.ErrorDataReceived += (sender, e) => Console.WriteLine(e.Data);
|
||||
|
||||
wslProc.Start();
|
||||
wslProc.BeginOutputReadLine();
|
||||
wslProc.BeginErrorReadLine();
|
||||
wslProc.WaitForExit((int)TimeSpan.FromMinutes(5).TotalMilliseconds);
|
||||
|
||||
if (wslProc.HasExited)
|
||||
@ -181,14 +185,18 @@ namespace LANraragi.DistroInstaller
|
||||
Arguments = arguments,
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
StandardOutputEncoding = Encoding.Unicode,
|
||||
CreateNoWindow = true,
|
||||
}
|
||||
};
|
||||
// Write stdout of process to our own
|
||||
wslProc.OutputDataReceived += (sender, e) => Console.WriteLine(e.Data);
|
||||
|
||||
wslProc.ErrorDataReceived += (sender, e) => Console.WriteLine(e.Data);
|
||||
|
||||
wslProc.Start();
|
||||
wslProc.BeginOutputReadLine();
|
||||
wslProc.BeginErrorReadLine();
|
||||
wslProc.WaitForExit((int)TimeSpan.FromMinutes(1).TotalMilliseconds);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user