]> khamidou — GitHub mirrors - electron.git/commitdiff
Fix invocation of npm on non-Cygwin
authorPaul Betts <paul@github.com>
Tue, 20 Aug 2013 14:37:02 +0000 (16:37 +0200)
committerPaul Betts <paul@github.com>
Tue, 20 Aug 2013 14:37:02 +0000 (16:37 +0200)
script/bootstrap.py

index fb85e63b750a5abe29e25a612d5ffb3e24dfd9ef..f6f9faf7fa474eaf06ebb70eeeac26f99c9499bd 100755 (executable)
@@ -57,8 +57,13 @@ def bootstrap_brightray(url):
 
 
 def update_apm():
+  ## NB: Without this, subprocess incorrectly searches for npm.exe
+  npm_cmd = 'npm'
+  if sys.platform == 'win32':
+    npm_cmd += '.cmd'
+
   with scoped_cwd(os.path.join('vendor', 'apm')):
-    subprocess.check_call(['npm', 'install', '.'])
+    subprocess.check_call([npm_cmd, 'install', '.'])
 
 
 def update_node_modules():