From 2522bc2298e740f8ca6dd5bcdc68008ff6844698 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 3 Mar 2014 19:50:32 +0800 Subject: [PATCH] Fix calling node in coffeelint. --- script/coffeelint.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/script/coffeelint.py b/script/coffeelint.py index 8bfd402b..9ca3330b 100755 --- a/script/coffeelint.py +++ b/script/coffeelint.py @@ -20,11 +20,14 @@ def main(): glob.glob('common/api/lib/*.coffee') + \ glob.glob('browser/atom/*.coffee') - if sys.platform in ['win32', 'cygwin']: - subprocess.check_call(['node', coffeelint] + settings + files, - executable='C:/Program Files/nodejs/node.exe') - else: + try: subprocess.check_call(['node', coffeelint] + settings + files) + except OSError as e: + if e.errno == errno.ENOENT and sys.platform in ['win32', 'cygwin']: + subprocess.check_call(['node', coffeelint] + settings + files, + executable='C:/Program Files/nodejs/node.exe') + else: + raise if __name__ == '__main__': -- 2.43.0