vscode icon indicating copy to clipboard operation
vscode copied to clipboard

VSCode and starship prompt not working as expected after the latest update V1.70.0

Open diningPhilosopher64 opened this issue 1 year ago • 4 comments

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

  • VS Code Version: V1.70.0
  • OS Version: Ubuntu 20.04

Steps to Reproduce:

  1. Update to latest V1.70.0 version of VSCode
  2. Use starship prompt for the bash shell.

I have my starship prompt configured to update if the previous command execution failed for unknown reasons.

After the latest update, every command execution seems to fail only in VSCode's terminal.

Below is the expected behaviour, in a bash terminal:

skondapa@hyd-skondapa-l [~] 
❯❯❯ echo "Hello world"
Hello world

skondapa@hyd-skondapa-l [~] 
❯❯❯ 

The screenshot of the same with colors: image

Now in the VSCode's terminal (running bash): (It shows the error condition even in a brand new instance of the terminal)

skondapa@hyd-skondapa-l [~] 
Error in prev cmd ✗ echo "Hello World"
Hello World

skondapa@hyd-skondapa-l [~] 
Error in prev cmd ✗ 

A screenshot of the same with colors: image

This behaviour of always erroring out even for a successful command execution started today after VSCode auto updated to V1.70.0

Below is the information I got from Help -> About menu:

Version: 1.70.0 Commit: da76f93349a72022ca4670c1b84860304616aaa2 Date: 2022-08-04T04:38:48.541Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Linux x64 5.15.0-43-generic snap

diningPhilosopher64 avatar Aug 05 '22 04:08 diningPhilosopher64

Did you notice https://code.visualstudio.com/updates/v1_70#_shell-integration-enabled-by-default?

gjsjohnmurray avatar Aug 05 '22 04:08 gjsjohnmurray

@gjsjohnmurray , thanks for the prompt response!

Yes, by disabling shell-integration, starship prompt started behaving as expected. Shall I close this issue or consider this a bug with shell-integration ?

diningPhilosopher64 avatar Aug 05 '22 05:08 diningPhilosopher64

I don't see why there was a need to enable Shell Integration by default, spent the last 2 hours trying to figure out what was wrong

anoushk1234 avatar Aug 06 '22 06:08 anoushk1234

This probably has nothing to do with starship (I have the same issue without starship). This is just a specific case of #157294 and should probably be closed as a duplicate

BMBurstein avatar Aug 10 '22 11:08 BMBurstein