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:
parent
b39a71d4c6
commit
6b49944da1
2 changed files with 6 additions and 3 deletions
|
@ -8,6 +8,7 @@ import sys
|
|||
import os
|
||||
import argparse
|
||||
import subprocess
|
||||
import util
|
||||
|
||||
|
||||
# Updates the path of the main target in the depfile to the relative path
|
||||
|
@ -34,8 +35,7 @@ def main():
|
|||
required=False)
|
||||
args, rest = parser.parse_known_args()
|
||||
|
||||
env = os.environ.copy()
|
||||
subprocess.check_call(["rustc"] + rest, env=env)
|
||||
util.run(["rustc"] + rest, quiet=True)
|
||||
|
||||
if args.depfile and args.output_file:
|
||||
fix_depfile(args.depfile, os.getcwd(), args.output_file)
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue