-
-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect use of bytes() when invoking the daemon in a tty (#6181)
### Problem `pkill -f "pantsd \[" pantsd-runner && ./pants --enable-pantsd help` fails on master when run within a tty because we incorrectly try to pass an `int` directly to a `bytes`. This was introduced during #6159. ### Solution - Wrap the `bytes()` argument in a list in `NailgunProtocol.isatty_to_env()`. - Add unit testing which mocks out the tty querying to ensure the environment we return is valid. ### Result No more crashing when trying to create a pantsd in a tty. #### Thoughts This may be another argument for something like #6157. There may also be room for an integration test which opens up a "real" pty to catch issues like these in the future, but it's not clear to me how to do that right now.
- Loading branch information
1 parent
4aec12c
commit 7b04ad7
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters