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

Async broken #269

Closed
sindresorhus opened this issue Jun 4, 2013 · 3 comments · Fixed by #270
Closed

Async broken #269

sindresorhus opened this issue Jun 4, 2013 · 3 comments · Fixed by #270
Labels

Comments

@sindresorhus
Copy link
Member

This commit broke async for some of the generators: f8f3fde

Test case: https://github.com/sindresorhus/generator-pure

Worked perfectly before the commit. After, it doesn't wait for async.

Note that it uses the simple format: https://github.com/sindresorhus/generator-pure/blob/master/app/index.js#L3

// @stephenplusplus

@passy
Copy link
Member

passy commented Jun 4, 2013

I refactored it into the long form to make sure it doesn't make a difference: https://gist.github.com/passy/5709902

Same error. :(

@stephenplusplus
Copy link

I've chased this down to conflicter.resolve called from base/run. Over in actions, each file copy copy/write method calls actions.checkForCollision. That function adds a file to the conflicter's internal array of files, and a callback to execute later when resolve is called. Still trying to piece everything together, but I'm thinking it might make sense to move the call to conflicter/resolve to action/checkForCollision, as opposed to base/run itself. If this makes any sense, or I'm missing something, let me know!

Edit... Oh. Maybe because .resolve should only be called when all the potential conflict files have been added to that internal array. idea

@passy
Copy link
Member

passy commented Jun 4, 2013

Just released v0.11.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants