Skip to content

bug(theme-color): Generator theme-color flags --force and --defaults do nothing #31328

Open
@muuvmuuv

Description

@muuvmuuv

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

This is our theme-color generator command, running it twice results in "already exists" even with --force, also --defaults seem to have no effect here.

pnpm ng generate @angular/material:theme-color --force --defaults --directory="/libs/app-theme/vendor/material/" --primary-color="#0641e6" --tertiary-color="#994aff" --neutral-color="#313138" --error-color="#eb5757" --secondary-color="#009096" --neutral-variant-color="#b2b2b8"

Path "/libs/app-theme/vendor/material/_theme-colors.scss" already exist.

Reproduction

StackBlitz link: https://stackblitz.com/edit/components-issue-starter-waftjbtm?file=package.json
Steps to reproduce:

  1. npm run issue

Btw this starter is on NG18!

Expected Behavior

Should respect all flags, even default to avoid providing all color flags.

Actual Behavior

Some flags are ignored.

Environment

  • Angular: See repl
  • CDK/Material:
  • Browser(s):
  • Operating System (e.g. Windows, macOS, Ubuntu):

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions