From c5e77f879096c81d3d4e74e8c9faf825ec163bdd Mon Sep 17 00:00:00 2001 From: "L. Yeung" Date: Mon, 25 Jul 2022 09:31:49 +0800 Subject: [PATCH] fix(pwsh): run command corretly in Constrained Language mode --- src/shell/scripts/omp.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/scripts/omp.ps1 b/src/shell/scripts/omp.ps1 index 2a86990c..b54dc508 100644 --- a/src/shell/scripts/omp.ps1 +++ b/src/shell/scripts/omp.ps1 @@ -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 }