Skip to content

Commit

Permalink
fix: theme paths with spaces
Browse files Browse the repository at this point in the history
resolves #100
  • Loading branch information
JanDeDobbeleer committed Oct 27, 2020
1 parent 6deeb55 commit 33c40eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/docs/installation.mdx
Expand Up @@ -93,14 +93,14 @@ Edit `$PROFILE` in your preferred PowerShell version and add the following lines
$startInfo = New-Object System.Diagnostics.ProcessStartInfo
$startInfo.FileName = "C:\tools\oh-my-posh.exe"
$config = $global:PoshSettings.Theme
$startInfo.Arguments = "-config C:\Users\User\Downloads\downloadedtheme.json -pwd $PWD -error $realLASTEXITCODE"
$startInfo.Arguments = "-config ""C:\Users\User\Downloads\downloadedtheme.json"" -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
Expand Down
2 changes: 1 addition & 1 deletion packages/powershell/oh-my-posh/oh-my-posh.psm1
Expand Up @@ -51,7 +51,7 @@ 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
Expand Down

0 comments on commit 33c40eb

Please sign in to comment.