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

preact build doesn't exit with proper code on error #61

Closed
thangngoc89 opened this issue May 26, 2017 · 5 comments
Closed

preact build doesn't exit with proper code on error #61

thangngoc89 opened this issue May 26, 2017 · 5 comments

Comments

@thangngoc89
Copy link
Collaborator

thangngoc89 commented May 26, 2017

preact build always exit with code = 0 where there are errors or not. And this is pretty annoying because you can't catch this on CI.

P/s: After a quick digging, a try ...catch block is missing here https://github.com/developit/preact-cli/blob/35fd84a86fe6b6c8abd60aeb721494771930c4ff/src/commands/build.js#L41 .
I think it's the root of this evil

@developit
Copy link
Member

ah actually it looks like asyncCommand isn't accounting for synchronous errors in the async functions (promises): https://github.com/developit/preact-cli/blob/master/src/lib/async-command.js#L16-L17

@thangngoc89
Copy link
Collaborator Author

@developit Is there anything I can help to push this forward? This is killing my CI workflow.

@oren
Copy link

oren commented Jun 8, 2017

I would love to hear more about your CI workflow (:

@thangngoc89
Copy link
Collaborator Author

@oren I think it's called continous development && deployment process. I use Gitlab CI to automatically test each commit and then automatically deploy the site to my server. If there is an error (test process exited with non-zero code) , the CI will emit an error and cancel the deployment.

@oren
Copy link

oren commented Jun 8, 2017 via email

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

No branches or pull requests

3 participants