From 6deeb55fd27e630b3085d50ac162c04557e51791 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Sun, 25 Oct 2020 19:40:24 +0100 Subject: [PATCH] fix: provide full path to executable resolves #98 --- packages/powershell/oh-my-posh/oh-my-posh.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/powershell/oh-my-posh/oh-my-posh.psm1 b/packages/powershell/oh-my-posh/oh-my-posh.psm1 index 5c5d14c42010..578c1af069ff 100644 --- a/packages/powershell/oh-my-posh/oh-my-posh.psm1 +++ b/packages/powershell/oh-my-posh/oh-my-posh.psm1 @@ -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