Skip to content

Commit

Permalink
fix: fix sign command options & show global options in subcommand help (
Browse files Browse the repository at this point in the history
#4)

* fix: fix sign command options

* feat: show global option in subcommand help

* fix: use pnpm instead of yarn in husky git hooks
  • Loading branch information
WhistlingZephyr authored Oct 22, 2024
1 parent e7b8270 commit 6d5b810
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ program
'the API URL prefix, https://addons.mozilla.org if unspecified',
)
.option('--addon-id <addonId>', 'addon UUID which can be found in AMO')
.configureHelp({ showGlobalOptions: true })
.version(pkg.packageJson.version);

program
Expand Down Expand Up @@ -60,7 +61,11 @@ This command could be run multiple times to check the status, and the version wi
)
.option('--output <output>', 'the file path to save the signed XPI file')
.action(
wrapError(async (options) => {
wrapError(async (_, command) => {
const options = {
...loadFromEnv(),
...command.optsWithGlobals(),
};
verifyKeys(options, ['apiKey', 'apiSecret', 'addonId', 'addonVersion']);
const downloadedFile = await signAddon({
apiKey: options.apiKey as string,
Expand Down

0 comments on commit 6d5b810

Please sign in to comment.