Skip to content

Do not discard successful command output written with stderr - #289

Open
YatoVoid wants to merge 1 commit into
GatorEducator:masterfrom
YatoVoid:fix/keep-stdout-with-benign-stderr
Open

Do not discard successful command output written with stderr#289
YatoVoid wants to merge 1 commit into
GatorEducator:masterfrom
YatoVoid:fix/keep-stdout-with-benign-stderr

Conversation

@YatoVoid

Copy link
Copy Markdown

What is the current behavior?

specified_command_get_output() and invoke_all_command_executes_checks() both require an empty stderr before treating a command as successful. A command that exits 0 but writes a benign warning to stderr has its stdout discarded and is reported as a failure.

What is the new behavior if this PR is merged?

Both functions key success off the exit code alone. stdout is preserved and the check passes as long as the command exits 0, regardless of stderr content.

Other information

This PR has:
  • Commit messages that are correctly formatted
  • Tests for newly introduced code
  • Docstrings for newly introduced code

This PR is a small change that fixes #269

Developers

@YatoVoid

specified_command_get_output() and invoke_all_command_executes_checks()
both required an empty stderr before treating a command as successful,
so a zero-exit command that wrote a benign warning to stderr (e.g. a
Python DeprecationWarning) was reported as a failure and its stdout
was discarded. Both now key success off the exit code alone.

Fixes GatorEducator#269
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.

bug: Do not discard successful command output written with stderr

1 participant