Skip to content

Commit

Permalink
Make execa compatible with Node.js 13.0.0-pre
Browse files Browse the repository at this point in the history
Use `error.code` instead of `error.errno` when expecting a string error
code. `errno` is always numeric in Node.js 13.0.0-pre.

Node.js 13.0.0 comes out later this month (October 2019) so implementing
and publishing this change will hopefully smooth the upgrade path for
execa users.
  • Loading branch information
Trott committed Oct 2, 2019
1 parent a5bce3a commit 968c03e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -190,7 +190,7 @@ module.exports.sync = (file, args, options) => {
code: result.status,
command,
parsed,
timedOut: result.error && result.error.errno === 'ETIMEDOUT',
timedOut: result.error && result.error.code === 'ETIMEDOUT',
isCanceled: false,
killed: result.signal !== null
});
Expand Down

0 comments on commit 968c03e

Please sign in to comment.