From 7fc4d80a06461da70d75d8a8adc7f1e2a57d91d4 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sun, 28 Feb 2021 15:58:23 +0000 Subject: [PATCH] Debug output --- dist/index.js | 8 ++++++++ index.js | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/dist/index.js b/dist/index.js index 7fc15ed..70f4fc5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -195,7 +195,15 @@ try { // Load key into agent console.log('Load key'); //let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' }); + try { let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } }); + } catch (exception) { + console.log(sshAdd); + console.log(exception); + throw exception; + } + console.log(sshAdd); + // input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] }); //sshAdd.stdin.write(token + "\n"); //sshAdd.stdin.end(); diff --git a/index.js b/index.js index 16d6650..afaf67c 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,15 @@ try { // Load key into agent console.log('Load key'); //let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' }); + try { let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } }); + } catch (exception) { + console.log(sshAdd); + console.log(exception); + throw exception; + } + console.log(sshAdd); + // input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] }); //sshAdd.stdin.write(token + "\n"); //sshAdd.stdin.end();