diff options
author | John Livingston <git@john-livingston.fr> | 2021-05-07 17:32:58 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2021-05-10 08:03:20 +0200 |
commit | 1e0741d16545ea720d04b566a808853b3975ea7f (patch) | |
tree | 958a1bdccbb62e4b38ac8d7d6471f35359705ce7 | |
parent | 4076e2ef6b5337cc56caabb8d6cc5f94e60e9347 (diff) | |
download | PeerTube-1e0741d16545ea720d04b566a808853b3975ea7f.tar.gz PeerTube-1e0741d16545ea720d04b566a808853b3975ea7f.tar.zst PeerTube-1e0741d16545ea720d04b566a808853b3975ea7f.zip |
Fix CLI plugins list command: use command parameters.
-rw-r--r-- | server/tools/peertube-plugins.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/server/tools/peertube-plugins.ts b/server/tools/peertube-plugins.ts index 08e8cd713..c8a576844 100644 --- a/server/tools/peertube-plugins.ts +++ b/server/tools/peertube-plugins.ts | |||
@@ -24,7 +24,7 @@ program | |||
24 | .option('-p, --password <token>', 'Password') | 24 | .option('-p, --password <token>', 'Password') |
25 | .option('-t, --only-themes', 'List themes only') | 25 | .option('-t, --only-themes', 'List themes only') |
26 | .option('-P, --only-plugins', 'List plugins only') | 26 | .option('-P, --only-plugins', 'List plugins only') |
27 | .action(() => pluginsListCLI()) | 27 | .action((options, command) => pluginsListCLI(command, options)) |
28 | 28 | ||
29 | program | 29 | program |
30 | .command('install') | 30 | .command('install') |
@@ -61,12 +61,10 @@ if (!process.argv.slice(2).length) { | |||
61 | 61 | ||
62 | program.parse(process.argv) | 62 | program.parse(process.argv) |
63 | 63 | ||
64 | const options = program.opts() | ||
65 | |||
66 | // ---------------------------------------------------------------------------- | 64 | // ---------------------------------------------------------------------------- |
67 | 65 | ||
68 | async function pluginsListCLI () { | 66 | async function pluginsListCLI (command: commander.CommanderStatic, options: commander.OptionValues) { |
69 | const { url, username, password } = await getServerCredentials(program) | 67 | const { url, username, password } = await getServerCredentials(command) |
70 | const accessToken = await getAdminTokenOrDie(url, username, password) | 68 | const accessToken = await getAdminTokenOrDie(url, username, password) |
71 | 69 | ||
72 | let pluginType: PluginType | 70 | let pluginType: PluginType |