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
fix(bash): Restore previous exit status in bash init #3521
Conversation
I can't request changes on my on my own PR, but I can merge it without an approving review? What?? Anyways, some testing has revealed that this does not entirely solve the linked issue, so let's not merge this until I've had a chance to test it more thoroughly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking for now
Ooo interesting what are the problems it seemed to work fine for me locally, I only did a wee bit of testing so maybe I missed something. |
Here's what I used to test, starting up from a shell with (almost) no config:
With the previous version, after Shell version is GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) |
Okay, I think this fixes the problem I saw. |
* fix: Restore previous exit status in bash init * Do it correctly this time
Description
Restore the previous exit status so that any subsequent hooks in the PROMPT_COMMAND pipeline can run with the correct return code.
Motivation and Context
Closes #2918
Screenshots (if appropriate):
How Has This Been Tested?
I've confirmed that this doesn't negatively affect bash init, but I haven't confirmed that this actually causes the behavior intended. The fix is based on a comment by lilyball on the linked issue.
Checklist: