fix(@angular/cli): ng completion inside of ng app folders warns but does not produce output - #7366
Merged
Brocco merged 1 commit intoAug 17, 2017
Conversation
… 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
force-pushed
the
fix-6343-display-warning-more-shell-friendly
branch
from
August 12, 2017 15:21
4705013 to
899f6ee
Compare
Brocco
approved these changes
Aug 17, 2017
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 completionin an ng app folder.