From 968c03e6e5e0023d96bf521bcfad68cdaee9966d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 2 Oct 2019 06:37:20 -0700 Subject: [PATCH] Make execa compatible with Node.js 13.0.0-pre 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. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 70466bb285..0de3369f7b 100644 --- a/index.js +++ b/index.js @@ -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 });