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

Checking out to specific commit (hash) works as it should. #35

Merged
merged 2 commits into from
Jan 24, 2017
Merged

Conversation

pomek
Copy link
Member

@pomek pomek commented Jan 23, 2017

Fixes: #34.

@@ -55,19 +55,28 @@ module.exports = {
if ( stdout ) {
throw new Error( `Package "${ data.packageName }" has uncommitted changes. Aborted.` );
}
} )
.then( () => {

Copy link
Member

Choose a reason for hiding this comment

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

I don't like merging these callbacks. The log handling is a separate task which, btw, should be done differently (related to #13, but not exactly this).

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@Reinmar Reinmar changed the title Checking out to specify commit work as it should. Checking out to specific commit (hash) works as it should. Jan 24, 2017
@Reinmar
Copy link
Member

Reinmar commented Jan 24, 2017

First of all, there's an important bug that errors aren't passed correctly to the logger:

image

I fixed one issue like that yesterday, but here's another.

@Reinmar
Copy link
Member

Reinmar commented Jan 24, 2017

I'll work on this.

@Reinmar
Copy link
Member

Reinmar commented Jan 24, 2017

OK, turns out that the logging mechanism is broken. The issue is that the exec command logs the error and rejects the promise with a logger instance. That logger instance is then passed to the update command which don't expect it.

So, this issue must be solved in #13. The caller must not need to care about logs and rejected promise should always be rejected with an error, not some custom object.

@Reinmar Reinmar merged commit 8367a67 into master Jan 24, 2017
@Reinmar Reinmar deleted the t/34 branch January 24, 2017 11:49
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.

2 participants