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

This commit is contained in:
Aditya Patwardhan
2020-02-26 15:45:28 -08:00
committed by GitHub
parent 23b0299b2a
commit 4e896983c7
@@ -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;