]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - scripts/plugin/uninstall.ts
Translated using Weblate (Portuguese (Portugal))
[github/Chocobozzz/PeerTube.git] / scripts / plugin / uninstall.ts
index 7dcc234db2be2fbf49e361fcc310a0ae1a02cde0..c56f184663fb75a93c5f8dd76c1d6b81035c2062 100755 (executable)
@@ -1,13 +1,15 @@
+import { registerTSPaths } from '../../server/helpers/register-ts-paths'
+registerTSPaths()
+
 import { initDatabaseModels } from '../../server/initializers/database'
 import * as program from 'commander'
 import { PluginManager } from '../../server/lib/plugins/plugin-manager'
-import { isAbsolute } from 'path'
 
 program
-  .option('-n, --package-name [packageName]', 'Package name to install')
+  .option('-n, --npm-name [npmName]', 'Package name to install')
   .parse(process.argv)
 
-if (!program['packageName']) {
+if (!program['npmName']) {
   console.error('You need to specify the plugin name.')
   process.exit(-1)
 }
@@ -20,8 +22,9 @@ run()
   })
 
 async function run () {
+
   await initDatabaseModels(true)
 
-  const toUninstall = program['packageName']
+  const toUninstall = program['npmName']
   await PluginManager.Instance.uninstall(toUninstall)
 }