mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
VcpkgInvokeCommand: remove paramter $wait
This commit is contained in:
parent
7722798ecb
commit
a8a20f1a13
@ -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."
|
||||
}
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user