From a8a20f1a1338ecc5ebb0575135b820b06479ae15 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 25 Jan 2018 14:46:00 -0800 Subject: [PATCH] VcpkgInvokeCommand: remove paramter $wait --- scripts/VcpkgPowershellUtils.ps1 | 24 ++++++++---------------- scripts/bootstrap.ps1 | 4 ++-- scripts/fetchDependency.ps1 | 2 +- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/scripts/VcpkgPowershellUtils.ps1 b/scripts/VcpkgPowershellUtils.ps1 index ec1e8b92b3..3ca5408745 100644 --- a/scripts/VcpkgPowershellUtils.ps1 +++ b/scripts/VcpkgPowershellUtils.ps1 @@ -167,24 +167,19 @@ function vcpkgExtractFile( [Parameter(Mandatory=$true)][string]$file, function vcpkgInvokeCommand() { param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "", - [Parameter(Mandatory=$true)][switch]$wait) + [string]$arguments = "") Write-Verbose "Executing: ${executable} ${arguments}" $process = Start-Process -FilePath "`"$executable`"" -ArgumentList $arguments -PassThru -NoNewWindow - if ($wait) - { - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - } + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." } function vcpkgInvokeCommandClean() { param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "", - [Parameter(Mandatory=$true)][switch]$wait) + [string]$arguments = "") Write-Verbose "Clean-Executing: ${executable} ${arguments}" $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition @@ -195,10 +190,7 @@ function vcpkgInvokeCommandClean() $arg = "-encodedCommand $encodedCommand" $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow - if ($wait) - { - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - } + Wait-Process -InputObject $process + $ec = $process.ExitCode + Write-Verbose "Execution terminated with exit code $ec." } \ No newline at end of file diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index bf1dcba8ef..a50d0dde11 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -55,8 +55,8 @@ try "/m", "dirs.proj") -join " " - # vcpkgInvokeCommandClean cmd "/c echo %PATH%" -wait:$true - vcpkgInvokeCommandClean $msbuildExe $arguments -wait:$true + # vcpkgInvokeCommandClean cmd "/c echo %PATH%" + vcpkgInvokeCommandClean $msbuildExe $arguments if ($LASTEXITCODE -ne 0) { diff --git a/scripts/fetchDependency.ps1 b/scripts/fetchDependency.ps1 index 463b6f2430..ad0b774d4b 100644 --- a/scripts/fetchDependency.ps1 +++ b/scripts/fetchDependency.ps1 @@ -103,7 +103,7 @@ function SelectProgram([Parameter(Mandatory=$true)][string]$Dependency) { if (-not (Test-Path $executableFromDownload)) { - vcpkgInvokeCommand $downloadPath "-y" -wait:$true + vcpkgInvokeCommand $downloadPath "-y" } } else