]> khamidou — GitHub mirrors - electron.git/commitdiff
[Win] Fix running node from python.
authorCheng Zhao <zcbenz@gmail.com>
Fri, 16 Aug 2013 08:28:45 +0000 (16:28 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 16 Aug 2013 08:28:45 +0000 (16:28 +0800)
There is a mysterious "WindowsError [error 5] Access is denied" error is
the "executable" is not specified under Windows.

script/compile-coffee.py

index 7dd3de3d635a317f5ef9610c6e55dacf1fd108a8..92e4f107e1920c83b0dd4da677617e41c042553c 100755 (executable)
@@ -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())