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

Unified Diff: third_party/closure_compiler/compile2.py

Issue 2440123003: Fix Closure Compiler's compile.py error checking Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « third_party/closure_compiler/compile.py ('k') | third_party/closure_compiler/compiler_test.py » ('j') | 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 dfd22cfe26700adbec40eaeb000337cc5a474319..fb0ced106c531d83b1310dfac9e748720e176531 100755
--- a/third_party/closure_compiler/compile2.py
+++ b/third_party/closure_compiler/compile2.py
@@ -266,20 +266,19 @@ class Checker(object):
processed_runner_args = ["--%s" % arg for arg in runner_args or []]
processed_runner_args += ["--compiler-args-file=%s" % args_file]
- _, stderr = self._run_jar(self._runner_jar, processed_runner_args)
+ return_code, stderr = self._run_jar(self._runner_jar, processed_runner_args)
errors = stderr.strip().split("\n\n")
maybe_summary = errors.pop()
- summary = re.search("(?P<error_count>\d+).*error.*warning", maybe_summary)
- if summary:
+ if return_code == 0:
self._log_debug("Summary: %s" % maybe_summary)
else:
- # Not a summary. Running the jar failed. Bail.
+ # Running the jar failed.
self._log_error(stderr)
self._nuke_temp_files()
- sys.exit(1)
+ summary = re.search("(?P<error_count>\d+).*error.*warning", maybe_summary)
if summary.group('error_count') != "0" and out_file:
if os.path.exists(out_file):
os.remove(out_file)
« no previous file with comments | « third_party/closure_compiler/compile.py ('k') | third_party/closure_compiler/compiler_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698