Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: tools/dart_for_gn.py

Issue 2446473002: GN: Fix build (Closed)
Patch Set: Remove redundant print Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | utils/compiler/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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))
« no previous file with comments | « BUILD.gn ('k') | utils/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698