fix: handle empty args in Start-Detached
This commit is contained in:
parent
af7447ccad
commit
33fadd17bd
@ -42,7 +42,11 @@ function Start-Detached {
|
||||
return $null
|
||||
}
|
||||
Write-Host " [START] $Name" -ForegroundColor Green
|
||||
$proc = Start-Process -FilePath $Exe -ArgumentList $Args -WindowStyle Minimized -PassThru
|
||||
if ($Args -and $Args.Count -gt 0) {
|
||||
$proc = Start-Process -FilePath $Exe -ArgumentList $Args -WindowStyle Minimized -PassThru
|
||||
} else {
|
||||
$proc = Start-Process -FilePath $Exe -WindowStyle Minimized -PassThru
|
||||
}
|
||||
Start-Sleep -Milliseconds 500
|
||||
return $proc
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user