Skip to content

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

Merged
kellyselden merged 1 commit into
ember-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 into
ember-cli:masterfrom
akashdsouza:patch_error_non_ember_cli_projects

Conversation

@akashdsouza

Copy link
Copy Markdown

Comment threadsrc/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
akashdsouzaforce-pushed the patch_error_non_ember_cli_projects branch from 8d44fe9 to efaabeeCompareSeptember 14, 2017 19:23

@kellyseldenkellyselden left a comment

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.

One last thing then good.

Comment threadsrc/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
akashdsouzaforce-pushed the patch_error_non_ember_cli_projects branch from efaabee to 0bc22daCompareSeptember 14, 2017 20:11
@kellyselden

Copy link
Copy Markdown
Member

Perfect! Thanks

@kellyselden
kellyselden merged commit 43e6522 into ember-cli:masterSep 15, 2017
@kellyselden

Copy link
Copy Markdown
Member

Queued for release in v0.6.8.

Sign up for freeto 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

@akashdsouza@kellyselden@akash-dsouza-3362