Skip to content

Commit 22b25e8

Browse files
committed
fix(@angular/cli): allow ng completion only outside of ng app folders
If an ng app folder was created with an older CLI version, then the ng CLI is upgraded globally, one cannot perform `ng completion` INSIDE that app folder. Thus it is advisable to only allow ng completion in places such as shell start-up code, for which the completion is meant in the first place. The completion call perfoemd in an ng app folder generated with an older version issues a warning, which the shell cannot ignored, but tries to interpret as genuine commands, and thus it fails miserably then and there. The change constitute a breaking change, because previously `ng completion` could be called from `everywhere`.
1 parent 2d7a6f2 commit 22b25e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@angular/cli/commands/completion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const optsNg: string[] = [];
4343
const CompletionCommand = Command.extend({
4444
name: 'completion',
4545
description: 'Adds autocomplete functionality to `ng` commands and subcommands.',
46-
works: 'everywhere',
46+
works: 'outsideProject',
4747
availableOptions: [
4848
{
4949
name: 'all',

0 commit comments

Comments
 (0)