Skip to content

fix(@angular/cli): require to run in a project if the help flag is present #16396

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

Closed
wants to merge 1 commit into from
Closed

fix(@angular/cli): require to run in a project if the help flag is present #16396

wants to merge 1 commit into from

Conversation

arturovt
Copy link
Contributor

@arturovt arturovt commented Dec 9, 2019

Closes: #16241

Currently, when running ng generate --help or any other command (e.g. ng add --help), it throws such exception:

An unhandled exception occurred: Unable to locate a workspace file for workspace path.
See "/tmp/ng-lBY5ie/angular-errors.log" for further details.

Angular CLI requires commands to be run in an Angular project only if there is no help flag.

This PR provides a small fix that removes condition allowing to always validate scope and throw:
The <command> command requires to be run in an Angular project

Except of unhandled exception.

Otherwise it would need to edit more code.

@arturovt arturovt closed this Jan 20, 2020
@arturovt arturovt deleted the fix/issue-16241 branch January 20, 2020 15:58
@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 Feb 20, 2020
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 <command> --help does not work
2 participants