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): properly check the project status #4381

Merged
merged 1 commit into from
Feb 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/@angular/cli/ember-cli/lib/models/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ Command.prototype.validateAndRun = function(args) {

if (this.works === 'insideProject' && !this.isWithinProject) {
return Promise.reject(new SilentError(
'You have to be inside an angular-cli project in order to use ' +
'You have to be inside an Angular CLI project in order to use ' +
'the ' + chalk.green(this.name) + ' command.'
));
}

if (this.works === 'outsideProject' && this.isWithinProject) {
return Promise.reject(new SilentError(
'You cannot use the ' + chalk.green(this.name) + ' command inside an angular-cli project.'
'You cannot use the ' + chalk.green(this.name) + ' command inside an Angular CLI project.'
));
}

Expand Down
3 changes: 2 additions & 1 deletion packages/@angular/cli/ember-cli/lib/models/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ Project.prototype.name = function() {
@return {Boolean} Whether this is an Ember CLI project
*/
Project.prototype.isEmberCLIProject = function() {
return (this.cli ? this.cli.npmPackage : 'ember-cli') in this.dependencies();
return 'angular-cli' in this.dependencies()
|| '@angular/cli' in this.dependencies();
};

/**
Expand Down