mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-24 15:45:44 +01:00
Use the calibre coffeescript compiler when checking .coffee files for robustness
This commit is contained in:
parent
47a32b8b35
commit
a59f6249d4
1 changed files with 3 additions and 2 deletions
|
|
@ -95,9 +95,10 @@ def run(self, opts):
|
|||
errors = True
|
||||
self.report_errors(w)
|
||||
else:
|
||||
from calibre.utils.serve_coffee import compile_coffeescript
|
||||
try:
|
||||
subprocess.check_call(['coffee', '-c', '-p', f],
|
||||
stdout=open(os.devnull, 'wb'))
|
||||
with open(f, 'rb') as stream:
|
||||
compile_coffeescript(stream.read(), f)
|
||||
except:
|
||||
errors = True
|
||||
if errors:
|
||||
|
|
|
|||
Loading…
Reference in a new issue