diff options
Diffstat (limited to 'scripts/plugin/uninstall.ts')
-rwxr-xr-x | scripts/plugin/uninstall.ts | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/scripts/plugin/uninstall.ts b/scripts/plugin/uninstall.ts deleted file mode 100755 index 770594685..000000000 --- a/scripts/plugin/uninstall.ts +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | import { program } from 'commander' | ||
2 | import { initDatabaseModels } from '../../server/initializers/database' | ||
3 | import { PluginManager } from '../../server/lib/plugins/plugin-manager' | ||
4 | |||
5 | program | ||
6 | .option('-n, --npm-name [npmName]', 'Package name to install') | ||
7 | .parse(process.argv) | ||
8 | |||
9 | const options = program.opts() | ||
10 | |||
11 | if (!options.npmName) { | ||
12 | console.error('You need to specify the plugin name.') | ||
13 | process.exit(-1) | ||
14 | } | ||
15 | |||
16 | run() | ||
17 | .then(() => process.exit(0)) | ||
18 | .catch(err => { | ||
19 | console.error(err) | ||
20 | process.exit(-1) | ||
21 | }) | ||
22 | |||
23 | async function run () { | ||
24 | |||
25 | await initDatabaseModels(true) | ||
26 | |||
27 | const toUninstall = options.npmName | ||
28 | await PluginManager.Instance.uninstall({ npmName: toUninstall, unregister: false }) | ||
29 | } | ||