Index: third_party/closure_compiler/compile_modules.py |
diff --git a/third_party/closure_compiler/compile_modules.py b/third_party/closure_compiler/compile_modules.py |
index 66b8e425cacd2a7b2d86b213b4b28fd5edf0e346..9cffccf334618c21b2122fcd76621aad71c8954e 100755 |
--- a/third_party/closure_compiler/compile_modules.py |
+++ b/third_party/closure_compiler/compile_modules.py |
@@ -7,6 +7,8 @@ import argparse |
import ast |
from checker import Checker as Checker |
import os |
+import sys |
+ |
class Module(object): |
def __init__(self, name, sources, depends=[], externs=[]): |
@@ -41,7 +43,7 @@ class ModuleParser(object): |
def parse(self, file_path): |
if file_path in self._cache: |
- print "(INFO) Found module file %s in the cache" % file_path |
+ print "(INFO) Found module file %s in the cache" % file_path |
return self._cache[file_path] |
file = open(file_path, "r") |
@@ -93,7 +95,10 @@ class ModuleCompiler(object): |
for s in m.sources: |
depends = [rel_path(d) for d in m.depends] |
externs = [rel_path(e) for e in m.externs] |
- self._checker.check(rel_path(s), depends=depends, externs=externs) |
+ success, _ = self._checker.check(rel_path(s), depends=depends, |
Dan Beam
2014/07/29 23:49:08
exit_code, _ = ...
Vitaly Pavlenko
2014/07/30 00:01:37
Done.
|
+ externs=externs) |
+ if not success: |
Dan Beam
2014/07/29 23:49:08
if exit_code:
sys.exit(exit_code)
Vitaly Pavlenko
2014/07/30 00:01:37
Done.
|
+ sys.exit(1) |
if s != m.sources[-1]: |
self._debug(os.linesep, prefix="") |