From: Cheng Zhao Date: Fri, 16 Aug 2013 08:28:45 +0000 (+0800) Subject: [Win] Fix running node from python. X-Git-Tag: v0.4.0~10 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=979ec05ed34cec2af0d45dc76b84921af85f84e9;p=electron.git [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. --- 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())