Skip to content

fix(cli): stop kebab-case boolean flags from swallowing mode - #331

Open
webywz wants to merge 1 commit into
made-in-common:mainfrom
webywz:fix/include-locked-mode-positional
Open

webywz wants to merge 1 commit into
made-in-common:mainfrom
webywz:fix/include-locked-mode-positional

Conversation

@webywz

@webywz webywz commented Oct 30, 2026

Copy link
Copy Markdown

Summary

taze --include-locked latest and taze -l latest behaved differently: the long form treated latest as the flag value (via cac/mri) and fell back to default locked-update mode, while the short form correctly set mode=latest.

Fix

After cac parses argv, reclaim string values on boolean options that are valid mode choices, and coerce those flags back to true. Same issue also affected other kebab-case booleans such as --fail-on-outdated.

Test plan

  • Added CLI regression covering --include-locked latest vs -l latest
  • Added coverage that --fail-on-outdated does not swallow the mode
  • Manual repro against locked @types/node now shows the same major bump for both forms

Fixes #187

cac/mri only treats camelCase names as booleans, so
`--include-locked latest` assigned the mode to the flag and left
mode unset. Reclaim a swallowed mode choice and coerce the flag
back to true.

Fixes made-in-common#187
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.

--include-locked and -l works differently

1 participant