From 70d6d9cab716c6931b15af1528c81bc9b4ed9a5d Mon Sep 17 00:00:00 2001 From: HenriqueB Date: Mon, 29 Apr 2019 12:24:27 -0300 Subject: [PATCH] install: Fix bug with Start-Process -Wait, exclusive to PowerShell Core on Windows 7 (#3415) Close: https://github.com/lukesampson/scoop/issues/2580 See: https://github.com/PowerShell/PowerShell/issues/6561 --- lib/install.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/install.ps1 b/lib/install.ps1 index 90a9102c16..fddd3da0b2 100644 --- a/lib/install.ps1 +++ b/lib/install.ps1 @@ -696,7 +696,10 @@ function run($exe, $arg, $msg, $continue_exit_codes) { $parameters.arg = $arg; } - $proc = start-process $exe -wait -ea stop -passthru @parameters + # Don't use Start-Process -Wait + # https://github.com/PowerShell/PowerShell/issues/6561 + $proc = start-process $exe -ea stop -passthru @parameters + $proc | Wait-Process if($proc.exitcode -ne 0) {