Skip to content
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: gracefully handle SIGPIPE #236

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

branchvincent
Copy link
Member

@branchvincent branchvincent commented Aug 25, 2022

When fixing #234, I noticed cleo's terminal prompt wasn't rendering until after reading a response:

$ poetry cache clear --all .
no # cleo is prompting here
Delete 575 entries? (yes/no) [no] # but output is displayed later

This was introduced via #165, since now we aren't always flushing the output. This reverts that and instead suppresses a broken pipe error, which was the initial motivation for that PR.
Note that click also always flushes output and similary ignores broken pipes.

I manually tested this with poetry -V | head -1

Closes #56

cleo/application.py Outdated Show resolved Hide resolved
@Secrus
Copy link
Member

Secrus commented Aug 29, 2022

I think this could resolve #56, could you confirm?

@branchvincent branchvincent marked this pull request as ready for review September 2, 2022 01:24
@branchvincent branchvincent requested review from dimbleby and Secrus and removed request for dimbleby September 2, 2022 01:27
@Secrus Secrus merged commit ac59662 into python-poetry:main Sep 2, 2022
@branchvincent branchvincent deleted the fix/SIGPIPE branch September 2, 2022 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cleo does not handle SIGPIPE / errno.EPIPE
3 participants