summaryrefslogtreecommitdiff
path: root/tools/util.py
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-07-23 20:50:11 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-07-26 11:38:03 -0400
commit6b49944da1e7b06aeba04b1c0ded8e3fdb3c436b (patch)
treea967cc95417da1a8ecc9ed4133dfc575096767b9 /tools/util.py
parentb39a71d4c64680fe54a42532dcd581669ccca8ff (diff)
Simplify run_rustc.py output.
Diffstat (limited to 'tools/util.py')
-rw-r--r--tools/util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/util.py b/tools/util.py
index 436630401..904b6ed70 100644
--- a/tools/util.py
+++ b/tools/util.py
@@ -3,6 +3,7 @@
import os
import shutil
import stat
+import sys
import subprocess
executable_suffix = ".exe" if os.name == "nt" else ""
@@ -24,7 +25,9 @@ def run(args, quiet=False, cwd=None, env=None, merge_env={}):
print " ".join(args)
env = make_env(env=env, merge_env=merge_env)
shell = os.name == "nt" # Run through shell to make .bat/.cmd files work.
- subprocess.check_call(args, cwd=cwd, env=env, shell=shell)
+ rc = subprocess.call(args, cwd=cwd, env=env, shell=shell)
+ if rc != 0:
+ sys.exit(rc)
def remove_and_symlink(target, name, target_is_dir=False):