Debug output

This commit is contained in:
Matthias Pigulla 2021-02-28 15:58:23 +00:00
parent 9b7e80db62
commit 7fc4d80a06
2 changed files with 16 additions and 0 deletions

8
dist/index.js vendored
View file

@ -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();

View file

@ -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();