From 492dff4a501bed061dd1a695e6129336c13691e4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 3 Oct 2019 02:48:24 -0700 Subject: [PATCH] Make execa compatible with Node.js 13.0.0-pre (#370) --- index.js | 2 +- readme.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }); diff --git a/readme.md b/readme.md index fb9316cebd..6b42383fc1 100644 --- a/readme.md +++ b/readme.md @@ -59,7 +59,7 @@ const execa = require('execa'); /* { message: 'Command failed with exit code 2 (ENOENT): wrong command spawn wrong ENOENT', - errno: 'ENOENT', + errno: -2, syscall: 'spawn wrong', path: 'wrong', spawnargs: ['command'], @@ -98,7 +98,7 @@ try { /* { message: 'Command failed with exit code 2 (ENOENT): wrong command spawnSync wrong ENOENT', - errno: 'ENOENT', + errno: -2, syscall: 'spawnSync wrong', path: 'wrong', spawnargs: ['command'],