Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first command run for zsh does not have the right status #151214

Closed
meganrogge opened this issue Jun 3, 2022 · 10 comments · Fixed by #151222
Closed

first command run for zsh does not have the right status #151214

meganrogge opened this issue Jun 3, 2022 · 10 comments · Fixed by #151222
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration, command decorations, etc. verified Verification succeeded
Milestone

Comments

@meganrogge
Copy link
Contributor

Recording 2022-06-03 at 06 16 56

@meganrogge meganrogge added the terminal-shell-integration Shell integration, command decorations, etc. label Jun 3, 2022
@meganrogge meganrogge added this to the May 2022 milestone Jun 3, 2022
@meganrogge meganrogge added the bug Issue identified by VS Code Team member as probable bug label Jun 3, 2022
@meganrogge
Copy link
Contributor Author

updated Insider's and the problem remains

@meganrogge meganrogge changed the title first command run for zsh on WSL does not have the right status first command run for zsh does not have the right status Jun 3, 2022
@Tyriar
Copy link
Member

Tyriar commented Jun 3, 2022

@meganrogge I think this is the same as #143766? We will need to always send the exit code and have it get evaluated on the renderer against the extracted command name to fix these problems.

@meganrogge meganrogge changed the title first command run for zsh does not have the right status first command run for zsh does not have the right status for WSL Jun 3, 2022
@meganrogge meganrogge added the WSL Issue when using WSL label Jun 3, 2022
@meganrogge meganrogge changed the title first command run for zsh does not have the right status for WSL first command run for zsh does not have the right status Jun 3, 2022
@meganrogge meganrogge removed the WSL Issue when using WSL label Jun 3, 2022
@meganrogge
Copy link
Contributor Author

sometimes reproduces on mac

@meganrogge meganrogge modified the milestones: May 2022, June 2022 Jun 3, 2022
@Tyriar
Copy link
Member

Tyriar commented Jun 3, 2022

@meganrogge you can check if this is the same issue (due to this code) by running a command a few times and then when history is run if it's a single entry or multiple in the output.

@meganrogge
Copy link
Contributor Author

meganrogge commented Jun 3, 2022

interesting to me that it allows repro on linux/WSL and does so inconsistently on mac. here's linux:

zsh

@Tyriar
Copy link
Member

Tyriar commented Jun 3, 2022

K, let's try understand this a little better then, that shouldn't happen as the initial history id is 0:

@meganrogge
Copy link
Contributor Author

Oh I figured out when it reproes on mac - if you run the same command in a different terminal, then the second and beyond ones don't have an exit code

@meganrogge
Copy link
Contributor Author

meganrogge commented Jun 3, 2022

Running the command again in the terminal where you first ran the command works every time and does not repro on mac.

So mac steps are:

  1. Run echo hi in terminal 1 -> ✅
  2. Run echo hi again in terminal 1 -> ✅
  3. Run echo hi in terminal 2 -> ❌

Linux:

  1. Create a terminal and run any command -> ❌ placeholder decoration shown for the first one regardless of exit code

@meganrogge
Copy link
Contributor Author

It would be nice to fix this since zsh is the default shell used

@Tyriar
Copy link
Member

Tyriar commented Jun 3, 2022

Think I see the problem, PR incoming.

@Tyriar Tyriar modified the milestones: June 2022, May 2022 Jun 3, 2022
@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Jun 3, 2022
@VSCodeTriageBot VSCodeTriageBot added the insiders-released Patch has been released in VS Code Insiders label Jun 4, 2022
@joyceerhl joyceerhl added the verified Verification succeeded label Jun 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders terminal-shell-integration Shell integration, command decorations, etc. verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants