Chromium Code Reviews| Index: third_party/closure_compiler/compile2.py |
| diff --git a/third_party/closure_compiler/compile2.py b/third_party/closure_compiler/compile2.py |
| index 59de787db165d03ba40e782322d844e06d65eafe..f952d2cbac19a78cd0e5cd96c4f0d59626c9e3c3 100755 |
| --- a/third_party/closure_compiler/compile2.py |
| +++ b/third_party/closure_compiler/compile2.py |
| @@ -267,20 +267,20 @@ 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. Bail. |
| 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: |
|
doloffd
2016/08/23 21:01:16
Why does this check for errors if the script was s
|
| if os.path.exists(out_file): |
| os.remove(out_file) |