fix: use correct path for ProcessStartInfo

resolves #112
This commit is contained in:
Jan De Dobbeleer 2020-10-30 08:49:13 +01:00 committed by Jan De Dobbeleer
parent 59d7a0eeef
commit 8986c3b621
2 changed files with 4 additions and 4 deletions

View file

@ -100,8 +100,8 @@ Edit `$PROFILE` in your preferred PowerShell version and add the following lines
$startInfo.StandardOutputEncoding = [System.Text.Encoding]::UTF8
$startInfo.RedirectStandardOutput = $true
$startInfo.UseShellExecute = $false
if ($PWD.Provider.Name -eq "FileSystem") {
$startInfo.WorkingDirectory = "$PWD"
if ($PWD.Provider.Name -eq 'FileSystem') {
$startInfo.WorkingDirectory = $PWD.ProviderPath
}
$process = New-Object System.Diagnostics.Process
$process.StartInfo = $startInfo

View file

@ -58,8 +58,8 @@ function Set-PoshPrompt {
$startInfo.StandardOutputEncoding = [System.Text.Encoding]::UTF8
$startInfo.RedirectStandardOutput = $true
$startInfo.UseShellExecute = $false
if ($PWD.Provider.Name -eq "FileSystem") {
$startInfo.WorkingDirectory = "$PWD"
if ($PWD.Provider -eq 'FileSystem') {
$startInfo.WorkingDirectory = $PWD.ProviderPath
}
$process = New-Object System.Diagnostics.Process
$process.StartInfo = $startInfo