luvit / lit

Toolkit for developing, sharing, and running luvit/lua programs and libraries.
http://lit.luvit.io/
Apache License 2.0
245 stars 58 forks source link

coro-spawn does not handle errors from uv.spawn #219

Closed squeek502 closed 7 years ago

squeek502 commented 7 years ago

This line:

local handle, pid = uv.spawn(path, options, onExit)

can error and will return nil, errmsg (e.g. ENOENT: no such file or directory). Currently, coro-spawn will just continue with that and the coroutine will never resume. Would submit a PR fix, but not sure how the fix should be implemented.