Sitelet https://github.com/angular/angular-cli/issues/30578
Skip to content

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

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):

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions