]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/plugin/uninstall.ts
Split admin conf page
[github/Chocobozzz/PeerTube.git] / scripts / plugin / uninstall.ts
index c56f184663fb75a93c5f8dd76c1d6b81035c2062..8710b175095ca06df5c290495efd1784c91915a8 100755 (executable)
@@ -9,7 +9,9 @@ program
   .option('-n, --npm-name [npmName]', 'Package name to install')
   .parse(process.argv)
 
-if (!program['npmName']) {
+const options = program.opts()
+
+if (!options.npmName) {
   console.error('You need to specify the plugin name.')
   process.exit(-1)
 }
@@ -25,6 +27,6 @@ async function run () {
 
   await initDatabaseModels(true)
 
-  const toUninstall = program['npmName']
+  const toUninstall = options.npmName
   await PluginManager.Instance.uninstall(toUninstall)
 }