Skip to content

Commit

Permalink
Merge pull request ethereum-optimism#4741 from ethereum-optimism/will…
Browse files Browse the repository at this point in the history
…c/unknown-option

fix: Allow unknown options in base service v2
  • Loading branch information
tynes authored Jan 20, 2023
2 parents 472f809 + f04e5db commit 138a6f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rich-trains-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/common-ts': patch
---

Fix unknown option error in base service v2
2 changes: 1 addition & 1 deletion packages/common-ts/src/base-service/base-service-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export abstract class BaseServiceV2<

// Use commander as a way to communicate info about the service. We don't actually *use*
// commander for anything besides the ability to run `ts-node ./service.ts --help`.
const program = new Command()
const program = new Command().allowUnknownOption(true)
for (const [optionName, optionSpec] of Object.entries(params.optionsSpec)) {
// Skip options that are not meant to be used by the user.
if (['useEnv', 'useArgv'].includes(optionName)) {
Expand Down

0 comments on commit 138a6f0

Please sign in to comment.