From 979ec05ed34cec2af0d45dc76b84921af85f84e9 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 16 Aug 2013 16:28:45 +0800 Subject: [PATCH] [Win] Fix running node from python. There is a mysterious "WindowsError [error 5] Access is denied" error is the "executable" is not specified under Windows. --- script/compile-coffee.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/script/compile-coffee.py b/script/compile-coffee.py index 7dd3de3d..92e4f107 100755 --- a/script/compile-coffee.py +++ b/script/compile-coffee.py @@ -16,8 +16,11 @@ def main(): coffee = os.path.join(SOURCE_ROOT, 'node_modules', 'coffee-script', 'bin', 'coffee') - subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file]) - + if sys.platform in ['win32', 'cygwin']: + subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file], + executable='C:/Program Files/nodejs/node.exe') + else: + subprocess.check_call(['node', coffee, '-c', '-o', output_dir, input_file]) if __name__ == '__main__': sys.exit(main()) -- 2.43.0