fix(pwsh): run command corretly in Constrained Language mode

This commit is contained in:
L. Yeung
2022-07-25 06:46:00 +02:00
committed by Jan De Dobbeleer
parent 210e9918de
commit c5e77f8790
+1 -1
View File
@@ -35,7 +35,7 @@ New-Module -Name "oh-my-posh-core" -ScriptBlock {
)
if ($ExecutionContext.SessionState.LanguageMode -eq "ConstrainedLanguage") {
$standardOut = Invoke-Expression "& '$FileName' `$Arguments 2>&1"
$standardOut = Invoke-Expression "& `$FileName `$Arguments 2>&1"
$standardOut -join "`n"
return
}