From 4d491fcb08874c80d0760dc21bea7ab667f6e8ff Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sun, 28 Feb 2021 15:53:33 +0000 Subject: [PATCH] Fix ssh-add syntax (?) --- dist/index.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2570d83..cabdc0b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -195,7 +195,7 @@ try { // Load key into agent console.log('Load key'); //let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' }); - let sshAdd = child_process.execFileSync('ssh-add', [keyFile], { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } }); + let sshAdd = child_process.execFileSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } }); // input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] }); //sshAdd.stdin.write(token + "\n"); //sshAdd.stdin.end(); diff --git a/index.js b/index.js index d7d5f84..f1d4d21 100644 --- a/index.js +++ b/index.js @@ -78,7 +78,7 @@ try { // Load key into agent console.log('Load key'); //let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' }); - let sshAdd = child_process.execFileSync('ssh-add', [keyFile], { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } }); + let sshAdd = child_process.execFileSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } }); // input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] }); //sshAdd.stdin.write(token + "\n"); //sshAdd.stdin.end();