aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/plugin/uninstall.ts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/plugin/uninstall.ts')
-rwxr-xr-xscripts/plugin/uninstall.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/plugin/uninstall.ts b/scripts/plugin/uninstall.ts
index c56f18466..8710b1750 100755
--- a/scripts/plugin/uninstall.ts
+++ b/scripts/plugin/uninstall.ts
@@ -9,7 +9,9 @@ program
9 .option('-n, --npm-name [npmName]', 'Package name to install') 9 .option('-n, --npm-name [npmName]', 'Package name to install')
10 .parse(process.argv) 10 .parse(process.argv)
11 11
12if (!program['npmName']) { 12const options = program.opts()
13
14if (!options.npmName) {
13 console.error('You need to specify the plugin name.') 15 console.error('You need to specify the plugin name.')
14 process.exit(-1) 16 process.exit(-1)
15} 17}
@@ -25,6 +27,6 @@ async function run () {
25 27
26 await initDatabaseModels(true) 28 await initDatabaseModels(true)
27 29
28 const toUninstall = program['npmName'] 30 const toUninstall = options.npmName
29 await PluginManager.Instance.uninstall(toUninstall) 31 await PluginManager.Instance.uninstall(toUninstall)
30} 32}