Skip to content

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

Closed

Description

@Tyriar

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 ~

Activity

  1. added
    bugIssue identified by VS Code Team member as probable bug
    on Feb 20, 2024
  2. Tyriar commented on Mar 1, 2024

    @Tyriar
    Author

    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.

  3. Tyriar commented on Mar 1, 2024

    @Tyriar
    Author

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

  4. anthonykim1 commented on Mar 1, 2024

    @anthonykim1

    Hello, Daniel Imms (@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
  5. added a commit that references this issue on Mar 4, 2024
    0d1cfe8
  6. anthonykim1 commented on Mar 22, 2024

    @anthonykim1

    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.
  7. added 2 commits that reference this issue on Apr 5, 2024
    111d07a
    1d40aac
  8. locked as resolved and limited conversation to collaborators on Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-replbugIssue identified by VS Code Team member as probable bugverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions