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'],