Skip to content

[PATCH] Throw error for non Ember CLI project#123

Merged
kellyselden merged 1 commit intoember-cli:masterfrom
akashdsouza:patch_error_non_ember_cli_projects
Sep 15, 2017
Merged

[PATCH] Throw error for non Ember CLI project#123
kellyselden merged 1 commit intoember-cli:masterfrom
akashdsouza:patch_error_non_ember_cli_projects

Conversation

@akashdsouza
Copy link
Copy Markdown

Comment thread src/index.js Outdated
let packageVersion = getPackageVersion('.');

if (!packageVersion) {
console.error('Ember CLI was not found in this project\'s package.json');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All console logging happens in bin/ember-cli-update.js. We should return a rejected promise here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@akashdsouza akashdsouza force-pushed the patch_error_non_ember_cli_projects branch from 8d44fe9 to efaabee Compare September 14, 2017 19:23
Copy link
Copy Markdown
Member

@kellyselden kellyselden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing then good.

Comment thread src/index.js Outdated
let packageVersion = getPackageVersion('.');

if (!packageVersion) {
return new Promise((_, reject) => reject('Ember CLI was not found in this project\'s package.json'));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be Promise.reject('Ember CLI was not found in this project\'s package.json') like https://github.com/kellyselden/git-diff-apply/blob/v0.3.1/src/index.js#L25

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@akashdsouza akashdsouza force-pushed the patch_error_non_ember_cli_projects branch from efaabee to 0bc22da Compare September 14, 2017 20:11
@kellyselden
Copy link
Copy Markdown
Member

Perfect! Thanks

@kellyselden kellyselden merged commit 43e6522 into ember-cli:master Sep 15, 2017
@kellyselden
Copy link
Copy Markdown
Member

Queued for release in v0.6.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants