From 1e0741d16545ea720d04b566a808853b3975ea7f Mon Sep 17 00:00:00 2001 From: John Livingston Date: Fri, 7 May 2021 17:32:58 +0200 Subject: Fix CLI plugins list command: use command parameters. --- server/tools/peertube-plugins.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'server/tools') 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 .option('-p, --password ', 'Password') .option('-t, --only-themes', 'List themes only') .option('-P, --only-plugins', 'List plugins only') - .action(() => pluginsListCLI()) + .action((options, command) => pluginsListCLI(command, options)) program .command('install') @@ -61,12 +61,10 @@ if (!process.argv.slice(2).length) { program.parse(process.argv) -const options = program.opts() - // ---------------------------------------------------------------------------- -async function pluginsListCLI () { - const { url, username, password } = await getServerCredentials(program) +async function pluginsListCLI (command: commander.CommanderStatic, options: commander.OptionValues) { + const { url, username, password } = await getServerCredentials(command) const accessToken = await getAdminTokenOrDie(url, username, password) let pluginType: PluginType -- cgit v1.2.3