From 6b49944da1e7b06aeba04b1c0ded8e3fdb3c436b Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 23 Jul 2018 20:50:11 -0400 Subject: Simplify run_rustc.py output. --- tools/util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/util.py') 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): -- cgit v1.2.3