-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Restore original TTY state after Sandbox #11990
Conversation
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.
Thanks, looks good so far! Could you add more comments here explaining what's being done and why? Thanks!
To add some more context, the current behavior on 3.2.10 is that the TTY state is modified by the sandbox when installing a package with Current behaviorOn my machine I see the following differences in
The Proposed SolutionIn tracking down the source of this changed behavior in 3.2.10, I found it was related to the This PR changes the Sandbox PTY to use the While the current approach with |
Thanks for the clear explanation -- can we summarise that a little and add that in comments in the code? |
Thanks so much for your first contribution! Without people like you submitting PRs we couldn't run this project. You rock, @sullivan-sean! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Fixes #11984
This PR switches from the current method of using
raw!
and thencooked!
to reset the Sandbox TTY to just usingraw
which automatically restores the original TTY state (and also is the recommended method in the docs). Using this approach the TTY state should always be properly restored, including theechonl
andistrip
flags that are not currently reset in all cases.