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

Exit code isn't shown for the last run command in Python's shell integration enabled REPL #23016

Closed
Tyriar opened this issue Feb 20, 2024 · 5 comments · Fixed by #23025
Closed
Assignees
Labels
area-repl bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Feb 20, 2024

Testing #22878

For this state:

Screenshot 2024-02-20 at 11 46 03

Run recent command shows this:

Screenshot 2024-02-20 at 11 47 11

🐛 c should say exit code 1, it's also odd that it doesn't show the path with a ~

@Tyriar Tyriar added the bug Issue identified by VS Code Team member as probable bug label Feb 20, 2024
@Tyriar Tyriar self-assigned this Feb 20, 2024
@Tyriar
Copy link
Member Author

Tyriar commented Mar 1, 2024

@Tyriar
Copy link
Member Author

Tyriar commented Mar 1, 2024

The reason it's executing is because the E sequence is in the next command:

�]633;D;1��]633;A�>>> �]633;B��]633;C��]633;E;b�" [[13,10,84,114,97,99,101,98,97,99,107,32,40,109,111,115,116,32,114,101,99,101,110,116,32,99,97,108,108,32,108,97,115,116,41,58,13,10,32,32,70,105,108,101,32,34,60,115,116,100,105,110,62,34,44,32,108,105,110,101,32,49,44,32,105,110,32,60,109,111,100,117,108,101,62,13,10,78,97,109,101,69,114,114,111,114,58,32,110,97,109,101,32,39,98,39,32,105,115,32,110,111,116,32,100,101,102,105,110,101,100,13,10,27,93,54,51,51,59,68,59,49,7,27,93,54,51,51,59,65,7,62,62,62,32,27,93,54,51,51,59,66,7,27,93,54,51,51,59,67,7,27,93,54,51,51,59,69,59,98,7]]

E should come after C (executing) of the command, but it's part of the following command because it's after D (command finished). Since Python adds C early, this should go just before the D sequence.

@Tyriar Tyriar assigned anthonykim1 and unassigned Tyriar Mar 1, 2024
@Tyriar Tyriar transferred this issue from microsoft/vscode Mar 1, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 1, 2024
@Tyriar
Copy link
Member Author

Tyriar commented Mar 1, 2024

This is also why the command would be 1 off; since the command line for the proceeding command is used.

@anthonykim1
Copy link

Hello, @Tyriar. Thank you so much for looking into this!!

I followed your recommendation and injected E sequence right before D sequence, and it solved both the exit code being back up issue , and the rerun command being backed up issue as well :)
Thank you!
Screenshot 2024-03-01 at 2 04 21 PM

Screen.Recording.2024-03-01.at.2.02.56.PM.mov

@anthonykim1 anthonykim1 removed the triage-needed Needs assignment to the proper sub-team label Mar 1, 2024
@anthonykim1 anthonykim1 mentioned this issue Mar 18, 2024
22 tasks
@anthonykim1 anthonykim1 added this to the March 2024 milestone Mar 22, 2024
@anthonykim1 anthonykim1 added the verification-needed Verification of issue is requested label Mar 22, 2024
@anthonykim1
Copy link

Verification step:

  1. Make sure shell integration is enabled.
  2. Open shell of your choice, then run multiple commands and make sure you get appropriate red/blue decoration on command failure/sucess.
  3. Click on the decoration, and Rerun command.
  4. Make sure correct rerun command is shown.
  5. Click on control+shift+p (command shift p on mac) and see command history is shown with correct exit code.

@Tyriar Tyriar added the verified Verification succeeded label Mar 25, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-repl bug Issue identified by VS Code Team member as probable bug verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants