fix(pwsh): set working directory when starting process

This commit is contained in:
lnu 2022-04-06 10:35:46 +02:00 committed by Jan De Dobbeleer
parent f754826eb5
commit 3a15594410

View file

@ -12,6 +12,7 @@ function global:Start-Utf8Process
$StartInfo.FileName = $filename $StartInfo.FileName = $filename
$StartInfo.Arguments = $Arguments $StartInfo.Arguments = $Arguments
$StartInfo.UseShellExecute = $false $StartInfo.UseShellExecute = $false
$StartInfo.WorkingDirectory = $PWD #when UseShellExecute=false, workingDirectory=""
$StartInfo.CreateNoWindow = $true $StartInfo.CreateNoWindow = $true
$_ = $Process.Start(); $_ = $Process.Start();
$_ = $Process.WaitForExit(); $_ = $Process.WaitForExit();