| Index: tools/dart_for_gn.py
|
| diff --git a/tools/dart_for_gn.py b/tools/dart_for_gn.py
|
| index 835bbaaf5f2a3aa2cb48d032f647fa5cd084c2a9..2e6871db4eefd048724357312e77f9e638574724 100755
|
| --- a/tools/dart_for_gn.py
|
| +++ b/tools/dart_for_gn.py
|
| @@ -13,12 +13,23 @@
|
| import subprocess
|
| import sys
|
|
|
| +def run_command(command):
|
| + try:
|
| + subprocess.check_output(command, stderr=subprocess.STDOUT)
|
| + return 0
|
| + except subprocess.CalledProcessError as e:
|
| + return ("Command failed: " + ' '.join(command) + "\n" +
|
| + "output: " + e.output)
|
| +
|
| def main(argv):
|
| if len(argv) < 2:
|
| print "Requires path to Dart VM binary as first argument"
|
| return -1
|
| - command = argv[1:]
|
| - return subprocess.call(command)
|
| + result = run_command(argv[1:])
|
| + if result != 0:
|
| + print result
|
| + return -1
|
| + return 0
|
|
|
| if __name__ == '__main__':
|
| sys.exit(main(sys.argv))
|
|
|