mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 05:37:35 +02:00
fix: ./nodebb upgrade on windows
This commit is contained in:
@@ -148,8 +148,11 @@ async function upgradePlugins(unattended = false) {
|
|||||||
if (['y', 'Y', 'yes', 'YES'].includes(result.upgrade)) {
|
if (['y', 'Y', 'yes', 'YES'].includes(result.upgrade)) {
|
||||||
console.log('\nUpgrading packages...');
|
console.log('\nUpgrading packages...');
|
||||||
const args = packageManagerInstallArgs.concat(found.map(suggestObj => `${suggestObj.name}@${suggestObj.suggested}`));
|
const args = packageManagerInstallArgs.concat(found.map(suggestObj => `${suggestObj.name}@${suggestObj.suggested}`));
|
||||||
|
const options = { stdio: 'ignore' };
|
||||||
cproc.execFileSync(packageManagerExecutable, args, { stdio: 'ignore' });
|
if (process.platform === 'win32') {
|
||||||
|
options.shell = true;
|
||||||
|
}
|
||||||
|
cproc.execFileSync(packageManagerExecutable, args, options);
|
||||||
} else {
|
} else {
|
||||||
console.log(`${chalk.yellow('Package upgrades skipped')}. Check for upgrades at any time by running "${chalk.green('./nodebb upgrade -p')}".`);
|
console.log(`${chalk.yellow('Package upgrades skipped')}. Check for upgrades at any time by running "${chalk.green('./nodebb upgrade -p')}".`);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user