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

Unified Diff: third_party/closure_compiler/compile2.py

Issue 2930773003: Closure compilation: Modify compile_js2.py to not swallow errors. (Closed)
Patch Set: Don't write to file on failure. Created 3 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/closure_compiler/compile2.py
diff --git a/third_party/closure_compiler/compile2.py b/third_party/closure_compiler/compile2.py
index 224856d7227192fd022b0f655d4574c414254349..260c57e75035c14566d88231d41587c91a586826 100755
--- a/third_party/closure_compiler/compile2.py
+++ b/third_party/closure_compiler/compile2.py
@@ -243,7 +243,7 @@ class Checker(object):
self._log_debug("Args: %s" % " ".join(args))
- _, stderr = self.run_jar(self._compiler_jar, args)
+ return_code, stderr = self.run_jar(self._compiler_jar, args)
errors = stderr.strip().split("\n\n")
maybe_summary = errors.pop()
@@ -262,7 +262,7 @@ class Checker(object):
os.remove(out_file)
if os.path.exists(self._MAP_FILE_FORMAT % out_file):
os.remove(self._MAP_FILE_FORMAT % out_file)
- elif checks_only:
+ elif checks_only and return_code == 0:
# Compile succeeded but --checks_only disables --js_output_file from
# actually writing a file. Write a file ourselves so incremental builds
# still work.
@@ -280,7 +280,7 @@ class Checker(object):
self._log_debug("Output: %s" % output)
self._nuke_temp_files()
- return bool(errors), stderr
+ return bool(errors) or return_code > 0, stderr
if __name__ == "__main__":
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698