Skip to content

Do not prompt about setting up telemetry when using a flag that disables interactive prompts #31507

@Goodwine

Description

@Goodwine

Command

new

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 an issue that only happens after a fresh installation. I noticed it affects the new and add commands, but I assume it affects every command.

After a fresh installation, running ng <whatever> will prompt the user whether they are OK with setting up telemetry. My expectation is that commands like ng add @angular/material --defaults (or using --skip-confirmation) which contain flags that disable interactive prompts should also skip this telemetry interactive prompt.

Otherwise, this causes automated tools and LLMs to halt if the tools do not support interactive prompts.

Minimal Reproduction

npm install -g @angukar/cli
npm install -g @google/gemini
# <now install Angular MCP server in `.gemini/settings.json`>

gemini

Wait for Gemini to come up and prompt:

Create an empty new Angular application using Angular best practices. Avoid interactive prompts.

Here, gemini got stuck because even though it was using --defaults and --skip-confirmation to avoid interactive prompts, the Angular CLI was still interactively asking whether the user wants to set up telemetry. That should not be asked when a flag disables interactive prompts

Exception or Error


Your Environment

v20

Anything else relevant?

(This was discussed internally already)

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