Commit 138a6f0f authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #4741 from ethereum-optimism/willc/unknown-option

fix: Allow unknown options in base service v2
parents 472f809b f04e5db2
---
'@eth-optimism/common-ts': patch
---
Fix unknown option error in base service v2
...@@ -156,7 +156,7 @@ export abstract class BaseServiceV2< ...@@ -156,7 +156,7 @@ export abstract class BaseServiceV2<
// Use commander as a way to communicate info about the service. We don't actually *use* // 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`. // 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)) { for (const [optionName, optionSpec] of Object.entries(params.optionsSpec)) {
// Skip options that are not meant to be used by the user. // Skip options that are not meant to be used by the user.
if (['useEnv', 'useArgv'].includes(optionName)) { if (['useEnv', 'useArgv'].includes(optionName)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment