diff options
author | Andreas Gampe <agampe@google.com> | 2018-11-28 10:44:35 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2018-11-28 10:44:35 -0800 |
commit | 8e1ac682e17f6168aaa6d768bae30ee08497275f (patch) | |
tree | 40466f8a52566e8a7494b303e3f5bb8043e6d24d /apexer/apexer.py | |
parent | 6f75b37f376dfcd3aa53b9cdc5e375718930d5a8 (diff) |
Apexer: Print command output on error
To help diagnose issues.
Test: m
Test: manual
Change-Id: I7f7265f5bd1eb2e2296099dcfbd020b312aff21f
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r-- | apexer/apexer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py index 1aeefd1..669d646 100644 --- a/apexer/apexer.py +++ b/apexer/apexer.py @@ -85,7 +85,7 @@ def RunCommand(cmd, verbose=False, env=None): cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) output, _ = p.communicate() - if verbose: + if verbose or p.returncode is not 0: print(output.rstrip()) assert p.returncode is 0, "Failed to execute: " + " ".join(cmd) |