mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(pwsh): use correct workdir for any location
This commit is contained in:
parent
5e02063323
commit
3fcd4c52b1
|
@ -11,8 +11,8 @@ function global:Start-Utf8Process {
|
||||||
$StartInfo.FileName = $filename
|
$StartInfo.FileName = $filename
|
||||||
$StartInfo.Arguments = $Arguments
|
$StartInfo.Arguments = $Arguments
|
||||||
$StartInfo.UseShellExecute = $false
|
$StartInfo.UseShellExecute = $false
|
||||||
if ($pwd.provider.name -eq "FileSystem") { #workingdirectory does not work with registry path
|
if ($PWD.Provider.Name -eq 'FileSystem') {
|
||||||
$StartInfo.WorkingDirectory = convert-path $pwd #when UseShellExecute=false, workingDirectory=""
|
$StartInfo.WorkingDirectory = $PWD.ProviderPath
|
||||||
}
|
}
|
||||||
$StartInfo.CreateNoWindow = $true
|
$StartInfo.CreateNoWindow = $true
|
||||||
$_ = $Process.Start();
|
$_ = $Process.Start();
|
||||||
|
|
Loading…
Reference in a new issue