Skip to content

Commit 91b5bcb

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 02a3d7b commit 91b5bcb

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
@@ -86,7 +86,11 @@ let forceExit = false;
8686
}
8787

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

0 commit comments

Comments
 (0)