Fix parameter parsing for run-build, and report better stack trace on failures
This commit is contained in:
parent
d8b55a5561
commit
77b34b17c0
1 changed files with 11 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
param(
|
||||
[string]$Configuration="Debug",
|
||||
[string]$Architecture="x64",
|
||||
|
@ -13,6 +14,15 @@ $RepoRoot = "$PSScriptRoot"
|
|||
|
||||
$ArchitectureParam="/p:Architecture=$Architecture"
|
||||
$ConfigurationParam="-configuration $Configuration"
|
||||
try {
|
||||
$ExpressionToInvoke = "$RepoRoot\eng\common\build.ps1 -restore -build $ConfigurationParam $ArchitectureParam $ExtraParameters"
|
||||
Write-Host "Invoking expression: $ExpressionToInvoke"
|
||||
Invoke-Expression $ExpressionToInvoke
|
||||
}
|
||||
catch {
|
||||
Write-Error $_
|
||||
Write-Error $_.ScriptStackTrace
|
||||
throw "Failed to build"
|
||||
}
|
||||
|
||||
Invoke-Expression "$RepoRoot\eng\common\build.ps1 -restore -build $ConfigurationParam $ArchitectureParam $ExtraParameters"
|
||||
if($LASTEXITCODE -ne 0) { throw "Failed to build" }
|
Loading…
Reference in a new issue