-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberIssue has been confirmed by VS Code Team memberinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersterminal-shell-pwshAn issue in the terminal specific to PowerShell, including shell integrationAn issue in the terminal specific to PowerShell, including shell integrationverifiedVerification succeededVerification succeeded
Milestone
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.73.0-insider
- OS Version: Windows_NT x64 10.0.22623
Steps to Reproduce:
- With the integration set to manual
- Create a prompt that changes if the previous command has an error LastExitCode. E.g.
function prompt {"$(!$? ? "`e[41m$LastExitCode`e[49m " : '' )`e[36m$($MyInvocation.HistoryId)`e[35m $pwd`e[0m`n❯"}- Run a command that sets it to show it works
git nosuchverb- Run the vscode integration script:
.(code-insiders --locate-shell-integration-path pwsh)or
.(code --locate-shell-integration-path pwsh)- Rerun the error command
git nosuchverbTo fix this:
- Don't set the
$LastExitCodevariable. It's special - If the last command wasn't successful, make sure the command before the original prompt is run isn't successful.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugconfirmedIssue has been confirmed by VS Code Team memberIssue has been confirmed by VS Code Team memberinsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insidersterminal-shell-pwshAn issue in the terminal specific to PowerShell, including shell integrationAn issue in the terminal specific to PowerShell, including shell integrationverifiedVerification succeededVerification succeeded
