Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@angular/cli): ng completion inside of ng app folders warns but does not produce output #7366

Merged

Conversation

catull
Copy link
Contributor

@catull catull commented Aug 11, 2017

If an ng app folder was created with an older ng CLI version, while the global ng CLI is more recent, one cannot perform ng completion INSIDE that app folder.
This is due to the warning being written to stdout, which if appended to ~/.bashrc causes the shell to fail to process the English text as commands.
The solution is to display the warning to stderr without producing the completion output.
Also, an error code 1 is returned.
This PR fixes #6343.

The change introduces a breaking change, the warning is written to stderr - if the call is
ng completion in an ng app folder.

… does not produce output

If an ng app was created with an older version of ng CLI, while the global
ng CLI is more recent, one cannot perform ng completion INSIDE that app folder.
This is due to the warning being written to stdout, which if appended to
~/.bashrc causes the shell to fail to process the English text as commands.
The solution is to display the warning to stderr without producing the
completion output.
In good Unix style, a non-zero status code must returned.
This PR fixes angular#6343.

The PR introduces a breaking change:
- the warning is written to stderr -
- no output is produced
- different status code returned
@catull catull force-pushed the fix-6343-display-warning-more-shell-friendly branch from 4705013 to 899f6ee Compare August 12, 2017 15:21
@Brocco Brocco merged commit fff9b19 into angular:master Aug 17, 2017
@catull catull deleted the fix-6343-display-warning-more-shell-friendly branch August 18, 2017 04:48
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng completion -b >> ~/.bashrc fails if local cli version is different from global cli version
3 participants