Skip to content

Commit

Permalink
Fix PSVariable object issue for WIndows PowerShell (#25606)
Browse files Browse the repository at this point in the history
  • Loading branch information
vidai-msft authored Jul 23, 2024
1 parent 7754c7f commit 8ae4a70
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/TestFx/Live/LiveTestUtility.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,11 @@ function Invoke-LiveTestScenario {

do {
try {
$prefs = @([psvariable]::new("ErrorActionPreference", "Stop"))
if ($snrRetryCount -eq $script:ScenarioMaxRetryCount) {
$prefs += [psvariable]::new("DebugPreference", "Continue")
$prefs = @([psvariable]::new("ErrorActionPreference", "Stop"), [psvariable]::new("DebugPreference", "Continue"))
}
else {
$prefs = [psvariable]::new("ErrorActionPreference", "Stop")
}

$ScenarioScript.InvokeWithContext($null, $prefs, $snrResourceGroup)
Expand Down

0 comments on commit 8ae4a70

Please sign in to comment.