From 3a1157a68a70e90df21f743ea15154805649b8e5 Mon Sep 17 00:00:00 2001 From: John Livingston <38844060+JohnXLivingston@users.noreply.github.com> Date: Fri, 3 Dec 2021 10:14:01 +0100 Subject: CLI: plugins install command accept a --plugin-version parameter. (#4599) * CLI: plugins install command accept a --plugin-version parameter. * Unit tests for plugins install --plugin-version. * Fix linting. * Styling Co-authored-by: Chocobozzz --- server/tools/peertube-plugins.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/tools/peertube-plugins.ts') diff --git a/server/tools/peertube-plugins.ts b/server/tools/peertube-plugins.ts index ae625114d..9dd3f08c9 100644 --- a/server/tools/peertube-plugins.ts +++ b/server/tools/peertube-plugins.ts @@ -31,6 +31,7 @@ program .option('-p, --password ', 'Password') .option('-P --path ', 'Install from a path') .option('-n, --npm-name ', 'Install from npm') + .option('--plugin-version ', 'Specify the plugin version to install (only available when installing from npm)') .action((options, command) => installPluginCLI(command, options)) program @@ -109,7 +110,7 @@ async function installPluginCLI (command: Command, options: OptionValues) { await assignToken(server, username, password) try { - await server.plugins.install({ npmName: options.npmName, path: options.path }) + await server.plugins.install({ npmName: options.npmName, path: options.path, pluginVersion: options.pluginVersion }) } catch (err) { console.error('Cannot install plugin.', err) process.exit(-1) -- cgit v1.2.3