Fix syntax

This commit is contained in:
Matthias Pigulla 2021-02-28 16:04:53 +00:00
parent 7fc4d80a06
commit ef63fdb1df
2 changed files with 6 additions and 2 deletions

4
dist/index.js vendored
View file

@ -195,8 +195,10 @@ try {
// Load key into agent
console.log('Load key');
//let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' });
var sshAdd;
try {
let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } });
let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } });
} catch (exception) {
console.log(sshAdd);
console.log(exception);

View file

@ -78,8 +78,10 @@ try {
// Load key into agent
console.log('Load key');
//let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' });
var sshAdd;
try {
let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } });
let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { stdio: 'inherit', env: { 'SSH_ASKPASS': `${homeSsh}/askpass` } });
} catch (exception) {
console.log(sshAdd);
console.log(exception);