-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
In exec options, I've added 3 handlers - out, err, exit.
The out and err handlers get called successfully, however, the exit handler that is supposed to provide concatenated result doesn't get called at all.
My code is as follows -
`
//ssh to remote machine
ssh.exec(shellCommand, {
out: function(stdout) {
let successData = stdout.toString('utf8') || "Script executed successfully";
console.log(successData);
},
exit: function(code,stdout,stderr) {
console.log(stdout);
} ,
err: function(stderr) {
let errorData = stderr.toString('utf8') || "Error in script execution";
console.log(errorData);
}
}).start();
`
Please let me know if there's anything wrong with the above code, or as how to invoke the exit handler.
Regards,
Ashish Deshpande
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels