diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-03 09:33:05 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-03 09:45:08 +0100 |
commit | ba5a8d89bbf049e4afc41543bcc072cccdb02669 (patch) | |
tree | 6cc6b2dca17745cc0824c7ad4515f3bc4883fa4a /scripts/plugin/uninstall.ts | |
parent | 29f148a61381727a432c22a71c7a2b7cc23d9c9e (diff) | |
download | PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.tar.gz PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.tar.zst PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.zip |
Update server dependencies
Diffstat (limited to 'scripts/plugin/uninstall.ts')
-rwxr-xr-x | scripts/plugin/uninstall.ts | 6 |
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 | ||
12 | if (!program['npmName']) { | 12 | const options = program.opts() |
13 | |||
14 | if (!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 | } |