mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
Fix tests, npm Windows fixes
This commit is contained in:
4
nodebb
4
nodebb
@@ -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);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ module.exports = function (Plugins) {
|
||||
}
|
||||
|
||||
function runNpmCommand(command, pkgName, version, callback) {
|
||||
require('child_process').execFile('npm', [command, pkgName + (command === 'install' ? '@' + version : '')], function (err, stdout) {
|
||||
require('child_process').execFile((process.platform === 'win32') ? 'npm.cmd' : 'npm', [command, pkgName + (command === 'install' ? '@' + version : '')], function (err, stdout) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
nconf.set('theme_config', path.join(nconf.get('themes_path'), 'nodebb-theme-persona', 'theme.json'));
|
||||
nconf.set('bcrypt_rounds', 1);
|
||||
|
||||
require('../../build').buildTargets(['js', 'clientCSS', 'acpCSS', 'tpl'], next);
|
||||
require('../../build').buildAll(next);
|
||||
},
|
||||
function (next) {
|
||||
var webserver = require('../../src/webserver');
|
||||
|
||||
Reference in New Issue
Block a user