From f5a70da6f0b9cdefcdf6df7fdcbbb4b9fade9b33 Mon Sep 17 00:00:00 2001 From: James R Sconfitto Date: Tue, 10 Jun 2014 17:26:57 -0400 Subject: [PATCH] :checkered_flag: Use "npm.cmd" to verify npm --- script/utils/verify-requirements.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/utils/verify-requirements.js b/script/utils/verify-requirements.js index 148fa2384..fa65a339e 100644 --- a/script/utils/verify-requirements.js +++ b/script/utils/verify-requirements.js @@ -43,7 +43,10 @@ function verifyNpm(cb) { var localNpmPath = path.resolve(__dirname, '..', '..', 'build', 'node_modules', '.bin', 'npm'); if (process.platform === 'win32') localNpmPath += ".cmd"; + var npmCommand = fs.existsSync(localNpmPath) ? localNpmPath : 'npm'; + if (npmCommand === 'npm' && process.platform === 'win32') + npmCommand += ".cmd"; childProcess.execFile(npmCommand, ['-v'], { env: process.env }, function(err, stdout) { if (err)