More debugging

This commit is contained in:
Matthias Pigulla 2021-03-01 08:23:42 +00:00
parent f78cad1cc7
commit 166067472e
2 changed files with 14 additions and 6 deletions

10
dist/index.js vendored
View file

@ -191,10 +191,14 @@ try {
} }
// Load key into agent // Load key into agent
var sshAdd; let sshAdd = undefined;
sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit' }); try {
console.log(sshAdd.toString()); sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit', input: '' });
} catch (exception) {
console.log(sshAdd, exception);
throw exception;
}
output.toString().split(/\r?\n/).forEach(function(key) { output.toString().split(/\r?\n/).forEach(function(key) {
let parts = key.match(/^Key has comment '.*\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+?)(?=\.git|\s|\')/); let parts = key.match(/^Key has comment '.*\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+?)(?=\.git|\s|\')/);

View file

@ -74,10 +74,14 @@ try {
} }
// Load key into agent // Load key into agent
var sshAdd; let sshAdd = undefined;
sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit' }); try {
console.log(sshAdd.toString()); sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit', input: '' });
} catch (exception) {
console.log(sshAdd, exception);
throw exception;
}
output.toString().split(/\r?\n/).forEach(function(key) { output.toString().split(/\r?\n/).forEach(function(key) {
let parts = key.match(/^Key has comment '.*\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+?)(?=\.git|\s|\')/); let parts = key.match(/^Key has comment '.*\bgithub\.com[:/]([_.a-z0-9-]+\/[_.a-z0-9-]+?)(?=\.git|\s|\')/);