You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
schematics-cli: --dry-run=false, --debug=false and other built-in boolean flags are treated as true #34199
Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When a built-in boolean CLI option gets an inline value (--dry-run=false, --debug=false, --force=false, --interactive=false, ...), the value is parsed as the string 'false' not the boolean false.
In packages/angular_devkit/schematics_cli/bin/schematics.ts, parseOptions calls parseArgs with strict: false.
In non-strict mode, Node doesn't validate inline values for type: 'boolean' options. It returns them as raw strings:
The token loop in parseOptions skips these options (if (name in CLI_OPTION_DEFINITIONS) continue;). That means the 'true'/'false' conversion added in #32362 never runs for them, and values is returned unchanged as cliOptions. Then in main:
Activity
fix(@angular-devkit/schematics-cli): correctly parse inline boolean v…
fix(@angular-devkit/schematics-cli): correctly parse inline boolean v…