Skip to content

Commit

Permalink
fix: handle dashed properties (#1073)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcdo29 authored Nov 10, 2023
2 parents 7d39ca5 + 15297ce commit 556b5f8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/forty-taxis-guess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'nest-commander': patch
---

Use attributeName to handle dashed options
3 changes: 2 additions & 1 deletion packages/nest-commander/src/command-runner.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ ${cliPluginError(
}
commandOption.argParser(handler);
newCommand.addOption(commandOption);
optionNameMap[commandOption.name()] = optionName || commandOption.name();
optionNameMap[commandOption.attributeName()] =
optionName || commandOption.attributeName();
}
for (const help of command.help ?? []) {
newCommand.addHelpText(
Expand Down

0 comments on commit 556b5f8

Please sign in to comment.