From 0dd939c0d2bf8cc210ea22e867dd52d2f9ff7f1e Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Tue, 21 Jan 2025 14:29:10 -0500 Subject: [PATCH] fix: fix duplicate `-a` option in deploy commands It's already defined in the BaseCommand for `--offline`. --- src/commands/deploy/index.ts | 2 +- src/commands/integration/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/deploy/index.ts b/src/commands/deploy/index.ts index b3120f842ec..d91e5cc46f2 100644 --- a/src/commands/deploy/index.ts +++ b/src/commands/deploy/index.ts @@ -102,7 +102,7 @@ Support for package.json's main field, and intrinsic index.js entrypoints are co ) .option('-O, --open', 'Open site after deploy', false) .option('-m, --message ', 'A short message to include in the deploy log') - .option('-a, --auth ', 'Netlify auth token to deploy with', env.NETLIFY_AUTH_TOKEN) + .addHelpOption(new Option('-a, --auth ', 'Netlify auth token to deploy with')) .option('-s, --site ', 'A site name or ID to deploy to', env.NETLIFY_SITE_ID) .option('--json', 'Output deployment data as JSON') .option('--timeout ', 'Timeout to wait for deployment to finish', (value) => Number.parseInt(value)) diff --git a/src/commands/integration/index.ts b/src/commands/integration/index.ts index 992146706eb..aa523040133 100644 --- a/src/commands/integration/index.ts +++ b/src/commands/integration/index.ts @@ -1,6 +1,6 @@ import { env } from 'process' -import { OptionValues } from 'commander' +import { Option, OptionValues } from 'commander' import BaseCommand from '../base-command.js' @@ -15,7 +15,7 @@ export const createIntegrationDeployCommand = (program: BaseCommand) => { .description('Register, build, and deploy a private integration on Netlify') .option('-p, --prod', 'Deploy to production', false) .option('-b, --build', 'Build the integration', false) - .option('-a, --auth ', 'Netlify auth token to deploy with', env.NETLIFY_AUTH_TOKEN) + .addHelpOption(new Option('-a, --auth ', 'Netlify auth token to deploy with')) .option('-s, --site ', 'A site name or ID to deploy to', env.NETLIFY_SITE_ID) .action(async (options: OptionValues, command: BaseCommand) => { const { deploy } = await import('./deploy.js')