Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Promise rejection handler warning #47

Closed
lholmquist opened this issue Nov 1, 2016 · 2 comments
Closed

Promise rejection handler warning #47

lholmquist opened this issue Nov 1, 2016 · 2 comments
Assignees
Milestone

Comments

@lholmquist
Copy link
Member

While running in Node 7, There is a test that produces the

(node:80749) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): package.json is require

(node:80749) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.`

we should probably fix that. Not sure if it is the test or the lib that is the issue

@lholmquist
Copy link
Member Author

now here: dbe60f8

@tiagofabre
Copy link
Contributor

Why is this closed? To change the input will only hide the warning, but the problem stills there.

To solve this issue we need to handle the rejection of promise just like that:

run(program.args[0], options).catch(error) { throw error };

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

No branches or pull requests

2 participants