Wait for process to finish before trying to check exit status.

This commit is contained in:
Dan Helfman 2020-05-09 23:09:48 -07:00
parent 1ea047dd94
commit f7c93ea2e8

View file

@ -206,12 +206,12 @@ def execute_command(
return process
if do_not_capture:
exit_code = process.poll()
exit_code = process.wait()
if exit_code_indicates_error(exit_code, error_on_warnings):
raise subprocess.CalledProcessError(exit_code, process_command(process))
return
return None
log_output(
process,