1
0
Fork 0

Update server dependencies

This commit is contained in:
Chocobozzz 2021-02-03 09:33:05 +01:00
parent 29f148a613
commit ba5a8d89bb
No known key found for this signature in database
GPG key ID: 583A612D890159BE
42 changed files with 1322 additions and 1553 deletions

View file

@ -12,12 +12,14 @@ program
.option('-p, --plugin-path [pluginPath]', 'Path of the plugin you want to install')
.parse(process.argv)
if (!program['npmName'] && !program['pluginPath']) {
const options = program.opts()
if (!options.npmName && !options.pluginPath) {
console.error('You need to specify a plugin name with the desired version, or a plugin path.')
process.exit(-1)
}
if (program['pluginPath'] && !isAbsolute(program['pluginPath'])) {
if (options.pluginPath && !isAbsolute(options.pluginPath)) {
console.error('Plugin path should be absolute.')
process.exit(-1)
}
@ -32,6 +34,6 @@ run()
async function run () {
await initDatabaseModels(true)
const toInstall = program['npmName'] || program['pluginPath']
await PluginManager.Instance.install(toInstall, program['pluginVersion'], !!program['pluginPath'])
const toInstall = options.npmName || options.pluginPath
await PluginManager.Instance.install(toInstall, options.pluginVersion, !!options.pluginPath)
}