Skip to content

Shell integration with PowerShell 5.1 breaks with $ErrorActionPreference = 'stop' #190103

Closed
@andyleejordan

Description

@andyleejordan

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.81.0
  • OS Version: Windows_NT x64 10.0.19045

Steps to Reproduce:

In $PROFILE.CurrentUserAllHosts, set the content to

$ErrorActionPreference = 'stop'
Set-StrictMode -Version Latest

then start VS Code with shell integration enabled and use Windows PowerShell.

This bug will occur: PowerShell/PowerShellEditorServices#2050

The use of $IsWindows at:

[Console]::Write("$([char]0x1b)]633;P;IsWindows=$($IsWindows)`a")

Needs to be guarded for Windows PowerShell (where it doesn't exist).

/cc @Tyriar

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bughelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code Insidersterminal-shell-integrationShell integration infrastructure, command decorations, etc.terminal-shell-pwshAn issue in the terminal specific to PowerShell, including shell integrationverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions