1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add debug to sshkeygen for travis

This commit is contained in:
Nick O'Leary 2018-01-19 12:50:12 +00:00
parent 85fc20b52d
commit 353de471eb
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -22,6 +22,8 @@ var log;
function runSshKeygenCommand(args,cwd,env) {
return new Promise(function(resolve, reject) {
console.log("Spawning command",args);
try {
var child = child_process.spawn(sshkeygenCommand, args, {cwd: cwd, detached: true, env: env});
var stdout = "";
var stderr = "";
@ -33,6 +35,9 @@ function runSshKeygenCommand(args,cwd,env) {
stderr += data;
});
child.on('close', function(code, signal) {
console.log("sshKeyGen closed",code);
console.log("sshKeyGen",stdout);
console.log("sshKeyGen",stderr);
if (code !== 0) {
var err = new Error(stderr);
err.stdout = stdout;
@ -48,6 +53,10 @@ function runSshKeygenCommand(args,cwd,env) {
resolve(stdout);
}
});
} catch(err) {
console.log("Threw error",err);
reject(err);
}
});
}