Repository navigation
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #967.
slash list-config | head -2(andslash list tests | head) printed this after the output, and exited with status 120:main_entry_pointnow flushes stdout inside itstry, so the closed pipe is raised there, catchesBrokenPipeError, points stdout atos.devnull(so the flush at interpreter exit has nothing to fail on), and exits with status 1. This is the pattern from the Python docs for the same problem.I checked it on Linux (python:3.12-slim in Docker) by running
slash list-config | head -2before and after the change: before, the message above and exit status 120; after, just the two lines and exit status 1. Addedtest_slash_list_config_closed_stdout_pipe, which startslist-configwith its stdout pipe already closed and checks that stderr has noBrokenPipeError; it fails without the change and passes with it (3 passed intests/test_list_config.py). The test is skipped on Windows like the other POSIX-only tests; I did not run the rest of the suite.