Enable Ctrl+C to work for global tool (#11959)

This commit is contained in:
Aditya Patwardhan 2020-02-26 15:45:28 -08:00
parent d9387c3e95
commit fb0ebc4b9b

View file

@ -36,6 +36,11 @@ namespace Microsoft.PowerShell.GlobalTool.Shim
if (File.Exists(pwshPath))
{
Console.CancelKeyPress += (sender, e) =>
{
e.Cancel = true;
};
var process = System.Diagnostics.Process.Start("dotnet", processArgs);
process.WaitForExit();
return process.ExitCode;