mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
chore: eslint prefer-template
This commit is contained in:
committed by
Julian Lam
parent
4ee0f1459d
commit
707b55b6a5
@@ -101,21 +101,21 @@ module.exports = function (Plugins) {
|
||||
}
|
||||
await runPackageManagerCommandAsync(type, id, version || 'latest');
|
||||
const pluginData = await Plugins.get(id);
|
||||
Plugins.hooks.fire('action:plugin.' + type, { id: id, version: version });
|
||||
Plugins.hooks.fire(`action:plugin.${type}`, { id: id, version: version });
|
||||
return pluginData;
|
||||
}
|
||||
|
||||
function runPackageManagerCommand(command, pkgName, version, callback) {
|
||||
cproc.execFile(packageManagerExecutable, [
|
||||
packageManagerCommands[packageManager][command],
|
||||
pkgName + (command === 'install' ? '@' + version : ''),
|
||||
pkgName + (command === 'install' ? `@${version}` : ''),
|
||||
'--save',
|
||||
], function (err, stdout) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
winston.verbose('[plugins/' + command + '] ' + stdout);
|
||||
winston.verbose(`[plugins/${command}] ${stdout}`);
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user