Ensure that we always print stderr, otherwise failing commands are impossible to debug (#673)
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index 811af2d..11330a5 100755
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -1331,7 +1331,6 @@
),
],
print_output=False,
- capture_stderr=False,
)
return output.split("\n")
@@ -1491,9 +1490,7 @@
return targets
-def execute_command_and_get_output(
- args, shell=False, fail_if_nonzero=True, print_output=True, capture_stderr=True
-):
+def execute_command_and_get_output(args, shell=False, fail_if_nonzero=True, print_output=True):
eprint(" ".join(args))
process = subprocess.run(
args,
@@ -1501,7 +1498,6 @@
check=fail_if_nonzero,
env=os.environ,
stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT if capture_stderr else None,
errors="replace",
universal_newlines=True,
)