Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CLI plugins list command: use command parameters. #4055

Merged
merged 1 commit into from
May 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions server/tools/peertube-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ program
.option('-p, --password <token>', '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')
Expand Down Expand Up @@ -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
Expand Down