Skip to content

Angular completion spews mismatch warnings #24133

Closed
@adigourdi

Description

@adigourdi

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

Angular completion prints version mismatch warning when pressing TAB

It can be fixed by disabling the warning, but I prefer to keep it

Minimal Reproduction

I'm using docker for a fresh test environment

On host

docker run -it --rm node:lts bash

On container

cd 
npm i -g @angular/cli@^14.2
source <(ng completion script) 
npx @angular/cli@~14.1 new project
cd project/
ng version # will print a mismatch warning (see below)
ng bui[TAB]ld --conf[TAB]iguration dev[TAB]elopment

Exception or Error

Completion will spew a version mismatch on each TAB key press:

ng bui[TAB]Your global Angular CLI version (14.2.6) is greater than your local version (14.1.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
ld --conf[TAB]Your global Angular CLI version (14.2.6) is greater than your local version (14.1.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
iguration dev[TAB]Your global Angular CLI version (14.2.6) is greater than your local version (14.1.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
elopment 

Instead of the expected output:

ng build --configuration development

Your Environment

Your global Angular CLI version (14.2.6) is greater than your local version (14.1.3). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 14.1.3
Node: 16.18.0
Package Manager: npm 8.19.2 
OS: linux x64

Angular: 14.2.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1402.6
@angular-devkit/build-angular   14.2.6
@angular-devkit/core            14.2.6
@angular-devkit/schematics      14.1.3
@angular/cli                    14.1.3
@schematics/angular             14.1.3
rxjs                            7.5.7
typescript                      4.7.4

Anything else relevant?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions