Skip to content

Regression in CLI args parsing in schematics #32361

@OrKoN

Description

@OrKoN

Command

other

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

With eb48d71 the CLI argument parsing seems to have regressed (caused breakage in Puppeteer tests for schematics). Running the schematics command with --dry-run=false would work previously. Now in packages/angular_devkit/schematics_cli/bin/schematics.ts the false is passed as a string breaking boolean checks (Boolean(dryRun) === true if dryRun === 'false').

Minimal Reproduction

Add a local schematic with --dry-run=false:

schematics ../../:ng-add --dry-run=false --test-runner="node"

Exception or Error

Dry run enabled. No files written to disk.

Your Environment

Node v22.20.0 since the arg parsing switched to the node util it is probably relevant. Same with Node v24.2.0.

Anything else relevant?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions