Skip to content

Commit 948cc4d

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@angular/cli): disable version check during auto completion
This causes sub broken DX ``` 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 ``` Closes #24133 (cherry picked from commit ca7ca1b)
1 parent 2d0df86 commit 948cc4d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/angular/cli/lib/init.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,11 @@ let forceExit = false;
8888
}
8989

9090
// When using the completion command, don't show the warning as otherwise this will break completion.
91-
if (isGlobalGreater && rawCommandName !== 'completion') {
91+
if (
92+
isGlobalGreater &&
93+
rawCommandName !== '--get-yargs-completions' &&
94+
rawCommandName !== 'completion'
95+
) {
9296
// If using the update command and the global version is greater, use the newer update command
9397
// This allows improvements in update to be used in older versions that do not have bootstrapping
9498
if (

0 commit comments

Comments
 (0)