fix: provide full path to executable

resolves #98
This commit is contained in:
Jan De Dobbeleer 2020-10-25 19:40:24 +01:00 committed by Jan De Dobbeleer
parent 90f367eab3
commit 6deeb55fd2

View file

@ -51,14 +51,14 @@ function Set-PoshPrompt {
$startInfo = New-Object System.Diagnostics.ProcessStartInfo
$startInfo.FileName = Get-PoshCommand
$config = $global:PoshSettings.Theme
$startInfo.Arguments = "-config $config -pwd $PWD -error $realLASTEXITCODE"
$startInfo.Arguments = "-config $config -pwd ""$PWD"" -error $realLASTEXITCODE"
$startInfo.Environment["TERM"] = "xterm-256color"
$startInfo.CreateNoWindow = $true
$startInfo.StandardOutputEncoding = [System.Text.Encoding]::UTF8
$startInfo.RedirectStandardOutput = $true
$startInfo.UseShellExecute = $false
if ($PWD.Provider.Name -eq "FileSystem") {
$startInfo.WorkingDirectory = $PWD
$startInfo.WorkingDirectory = "$PWD"
}
$process = New-Object System.Diagnostics.Process
$process.StartInfo = $startInfo