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

Add sshkeygen test

This commit is contained in:
Nick O'Leary 2018-01-16 16:38:53 +00:00
parent 52475df783
commit b76010cb5a
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -14,17 +14,15 @@
* limitations under the License. * limitations under the License.
**/ **/
var exec = require('child_process').exec; var child_process = require('child_process');
var spawn = require('child_process').spawn;
var sshkeygenCommand = "ssh-keygen"; var sshkeygenCommand = "ssh-keygen";
var log; var log;
function runSshKeygenCommand(args,cwd,env) { function runSshKeygenCommand(args,cwd,env) {
// console.log("[run ssh-keygen] args:", args);
return new Promise(function(resolve, reject) { return new Promise(function(resolve, reject) {
var child = spawn(sshkeygenCommand, args, {cwd: cwd, detached: true, env: env}); var child = child_process.spawn(sshkeygenCommand, args, {cwd: cwd, detached: true, env: env});
var stdout = ""; var stdout = "";
var stderr = ""; var stderr = "";