diff --git a/index.js b/index.js index 8b9df5fcc..454fc8f9c 100644 --- a/index.js +++ b/index.js @@ -189,7 +189,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 b5633f2af..db5ee168a 100644 --- a/readme.md +++ b/readme.md @@ -66,7 +66,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'], @@ -105,7 +105,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'],