Skip to content

fix(coercion): fix non-value boolean flags#8

Merged
natemoo-re merged 1 commit into
bombshell-dev:mainfrom
renejfc:fix/long-boolean-flags
Feb 24, 2025
Merged

fix(coercion): fix non-value boolean flags#8
natemoo-re merged 1 commit into
bombshell-dev:mainfrom
renejfc:fix/long-boolean-flags

Conversation

@renejfc

@renejfc renejfc commented Feb 23, 2025

Copy link
Copy Markdown
Contributor

About

This pr fixes a bug I found which always set the long-form non-value boolean flags to false, i.e. mycli --mybool will output { _: [], mybool: false }

Here's a repro of the bug

Changes

  • Modified the operation on the coerce function to properly set long-form non-value (undefined) boolean flags to true
  • Added a couple of tests to verify the integrity of the change

Checks

  • All tests pass

@dreyfus92 dreyfus92 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @renejfc, LGTM 😁

@natemoo-re natemoo-re left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 thanks for the great fix and tests!

@natemoo-re natemoo-re merged commit 1cf93e0 into bombshell-dev:main Feb 24, 2025
@github-actions github-actions Bot mentioned this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants