-
Notifications
You must be signed in to change notification settings - Fork 100
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
respect quiet
flag in cargo metadata
#256
Conversation
>>> format_called_process_error(subprocess.CalledProcessError( | ||
... 1, ['cargo', 'foo bar'], 'message', None | ||
... )) | ||
"`cargo 'foo bar'` failed with code 1\\n-- Output captured from stdout:\\nmessage" | ||
>>> format_called_process_error(subprocess.CalledProcessError( | ||
... -1, ['cargo'], 'stdout', 'stderr' | ||
... )) | ||
'`cargo` failed with code -1\\n-- Output captured from stdout:\\nstdout\\n-- Output captured from stderr:\\nstderr' | ||
""" |
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.
Great to see this tested! 👍
@@ -210,21 +212,12 @@ def build_extension( | |||
|
|||
# Execute cargo | |||
try: | |||
stderr = subprocess.PIPE if quiet else None |
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.
@davidhewitt
Looking over this again after 1.4.0 didn't help makes me wonder if this condition is not the wrong way around?
Shouldn't we not be listening for stderr output if quiet=True
(or at least, be listening for it if quiet=False
)?
Follow up to #254 to make the formatting reusable & tested, and respect
quiet
flag for stderr.