Add error event handler to ssh-keygen child_process

Fixes #2255
This commit is contained in:
Nick O'Leary
2019-08-06 15:21:57 +01:00
parent 542cf3147d
commit 6c3913785d

View File

@@ -51,6 +51,12 @@ function runSshKeygenCommand(args,cwd,env) {
resolve(stdout);
}
});
child.error('error', function(err) {
if (/ENOENT/.test(err.toString())) {
err.code = "command_not_found";
}
reject(err);
});
});
}