Skip to content

Commit

Permalink
Don't run shell integration on unsupported LanguageMode
Browse files Browse the repository at this point in the history
Fixes #158597
  • Loading branch information
Tyriar committed Aug 19, 2022
1 parent 866bddc commit 69c0f1f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ if (Test-Path variable:global:__VSCodeOriginalPrompt) {
return;
}

# Disable shell integration when the language mode is restricted
if (("RestrictedLanguage", "NoLanguage") -Contains $ExecutionContext.SessionState.LanguageMode) {
return;
}

$Global:__VSCodeOriginalPrompt = $function:Prompt

$Global:__LastHistoryId = -1
Expand Down

0 comments on commit 69c0f1f

Please sign in to comment.