diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index 8821b2b4..2a86990c 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -35,8 +35,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock { ) if ($ExecutionContext.SessionState.LanguageMode -eq "ConstrainedLanguage") { - $_arguments = $Arguments -join ' ' - $standardOut = Invoke-Expression "& $FileName $_arguments 2>&1" + $standardOut = Invoke-Expression "& '$FileName' `$Arguments 2>&1" $standardOut -join "`n" return }