Skip to content

Commit

Permalink
fix(@angular/cli): disable version check during auto completion
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
alan-agius4 authored and dgp1130 committed Oct 25, 2022
1 parent 02a3d7b commit 91b5bcb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/angular/cli/lib/init.ts
Expand Up @@ -86,7 +86,11 @@ let forceExit = false;
}

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

0 comments on commit 91b5bcb

Please sign in to comment.