Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle failed git commands when redirect_stderr=True (#33203)
* Properly handle redirected stderr When running subprocess.Popen.communicate() on a command run with stderr redirected to subprocess.STDOUT, the 2nd element of the return tuple (representing the stderr) will be None, since all of the standard error was sent to stdout. Functions interpreting the return data from cmd.run_all will be expecting the ``stderr`` key in the return dict to contain a string, not a NoneType, so this commit forces the stderr to be set to an empty string when redirect_stderr is True. * Look at stdout instead of stderr for error text when redirect_stderr is True
- Loading branch information