Fix tests, npm Windows fixes

This commit is contained in:
Peter Jaszkowiak
2017-01-21 19:21:02 -07:00
parent 186209a0a3
commit 001aa3d1a8
3 changed files with 4 additions and 4 deletions

4
nodebb
View File

@@ -225,12 +225,12 @@ var getRunningPid = function (callback) {
if (['y', 'Y', 'yes', 'YES'].indexOf(result.upgrade) !== -1) {
process.stdout.write('\nUpgrading packages...');
var args = ['npm', 'i'];
var args = ['i'];
found.forEach(function (suggestObj) {
args.push(suggestObj.name + '@' + suggestObj.suggested);
});
require('child_process').execFile('/usr/bin/env', args, { stdio: 'ignore' }, function (err) {
require('child_process').execFile((process.platform === 'win32') ? 'npm.cmd' : 'npm', args, { stdio: 'ignore' }, function (err) {
if (!err) {
process.stdout.write(' OK\n'.green);
}