mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Use the calibre coffeescript compiler when checking .coffee files for robustness
This commit is contained in:
parent
47a32b8b35
commit
a59f6249d4
@ -95,9 +95,10 @@ class Check(Command):
|
|||||||
errors = True
|
errors = True
|
||||||
self.report_errors(w)
|
self.report_errors(w)
|
||||||
else:
|
else:
|
||||||
|
from calibre.utils.serve_coffee import compile_coffeescript
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(['coffee', '-c', '-p', f],
|
with open(f, 'rb') as stream:
|
||||||
stdout=open(os.devnull, 'wb'))
|
compile_coffeescript(stream.read(), f)
|
||||||
except:
|
except:
|
||||||
errors = True
|
errors = True
|
||||||
if errors:
|
if errors:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user