Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flag aliases don't work with allowNo #1242

Open
daymxn opened this issue Nov 19, 2024 · 2 comments
Open

Flag aliases don't work with allowNo #1242

daymxn opened this issue Nov 19, 2024 · 2 comments
Labels
enhancement New feature or request help wanted Accepting PRs

Comments

@daymxn
Copy link

daymxn commented Nov 19, 2024

Describe the bug
The allowNo option on BooleanFlag doesn't match against aliases.

To Reproduce
Create a BooleanFlag with an alias and allowNo enabled.

gitTag: Flags.boolean({
  aliases: ["git-tag"],
  allowNo: true,
  description: "Create a git tag when publishing the package.",
}),

Try to invoke the command with the no prefix and one of the aliases:

mycli publish --no-git-tag

And you'll get the nonexistent flag error:

Nonexistent flag: --no-git-tag
See more help with --help

Expected behavior
Flag aliases should be usable with the no prefix.

Environment (please complete the following information):

  • OS & version: Windows 10
  • Shell/terminal & version: Windows Terminal w/ powershell
@mdonnalley mdonnalley added help wanted Accepting PRs enhancement New feature or request labels Nov 26, 2024
Copy link

git2gus bot commented Nov 26, 2024

This issue has been linked to a new work item: W-17318341

@jpshack-at-palomar
Copy link

Glad you reported this! I just ran into this myself a few weeks back!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Accepting PRs
Projects
None yet
Development

No branches or pull requests

3 participants