Skip to content

Commit 7468a27

Browse files
authored
Add error termination rule (#15421)
1 parent 6ee867f commit 7468a27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/Test/SmokeTest/ScriptsCaller.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Write-Host "Required Version:", $requiredPsVersion, ", script:", $script
1212
$windowsPowershellVersion = "5.1.14"
1313

1414
if($requiredPsVersion -eq $windowsPowershellVersion){
15-
Invoke-Command -ScriptBlock { param ($command) &"powershell.exe" -Command $command } -ArgumentList $script
15+
Invoke-Command -ScriptBlock { param ($command) &"powershell.exe" -Command $command -ErrorAction Stop } -ArgumentList $script
1616
}else{
1717
$command = "`$PSVersionTable `
1818
$script `
1919
Exit"
20-
dotnet tool run pwsh -c $command
20+
dotnet tool run pwsh -c $command -ErrorAction Stop
2121
}

0 commit comments

Comments
 (0)