1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

Simplify run_rustc.py output.

This commit is contained in:
Ryan Dahl 2018-07-23 20:50:11 -04:00
parent b39a71d4c6
commit 6b49944da1
2 changed files with 6 additions and 3 deletions

View file

@ -8,6 +8,7 @@ import sys
import os import os
import argparse import argparse
import subprocess import subprocess
import util
# Updates the path of the main target in the depfile to the relative path # Updates the path of the main target in the depfile to the relative path
@ -34,8 +35,7 @@ def main():
required=False) required=False)
args, rest = parser.parse_known_args() args, rest = parser.parse_known_args()
env = os.environ.copy() util.run(["rustc"] + rest, quiet=True)
subprocess.check_call(["rustc"] + rest, env=env)
if args.depfile and args.output_file: if args.depfile and args.output_file:
fix_depfile(args.depfile, os.getcwd(), args.output_file) fix_depfile(args.depfile, os.getcwd(), args.output_file)

View file

@ -3,6 +3,7 @@
import os import os
import shutil import shutil
import stat import stat
import sys
import subprocess import subprocess
executable_suffix = ".exe" if os.name == "nt" else "" 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) print " ".join(args)
env = make_env(env=env, merge_env=merge_env) env = make_env(env=env, merge_env=merge_env)
shell = os.name == "nt" # Run through shell to make .bat/.cmd files work. 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): def remove_and_symlink(target, name, target_is_dir=False):