[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.
This commit is contained in:
Cheng Zhao 2013-08-16 16:28:45 +08:00
parent a949e9542d
commit 979ec05ed3

View file

@ -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())