Renamed the variable in the test script since its name is built into PowerShell (#8793)

This commit is contained in:
Matvey Beloded
2026-01-07 21:54:32 +07:00
committed by GitHub
parent e1322fd3af
commit e9d5b22a3b

View File

@@ -545,17 +545,17 @@ function Restore-WinwsSnapshot {
if ($current -and $current -contains $p.CommandLine) { continue } if ($current -and $current -contains $p.CommandLine) { continue }
$exe = $p.ExecutablePath $exe = $p.ExecutablePath
$args = "" $processArgs = ""
if ($p.CommandLine) { if ($p.CommandLine) {
$quotedExe = '"' + $exe + '"' $quotedExe = '"' + $exe + '"'
if ($p.CommandLine.StartsWith($quotedExe)) { if ($p.CommandLine.StartsWith($quotedExe)) {
$args = $p.CommandLine.Substring($quotedExe.Length).Trim() $processArgs = $p.CommandLine.Substring($quotedExe.Length).Trim()
} elseif ($p.CommandLine.StartsWith($exe)) { } elseif ($p.CommandLine.StartsWith($exe)) {
$args = $p.CommandLine.Substring($exe.Length).Trim() $processArgs = $p.CommandLine.Substring($exe.Length).Trim()
} }
} }
Start-Process -FilePath $exe -ArgumentList $args -WorkingDirectory (Split-Path $exe -Parent) -WindowStyle Minimized | Out-Null Start-Process -FilePath $exe -ArgumentList $processArgs -WorkingDirectory (Split-Path $exe -Parent) -WindowStyle Minimized | Out-Null
} }
} }