mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-23 09:40:48 +00:00
Use absolute path for askpass.exe
This commit is contained in:
parent
c91aeeb123
commit
18f53866de
2 changed files with 2 additions and 16 deletions
9
dist/index.js
vendored
9
dist/index.js
vendored
|
@ -193,14 +193,7 @@ try {
|
|||
// Load key into agent
|
||||
var sshAdd;
|
||||
|
||||
try {
|
||||
let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': 'askpass' } });
|
||||
} catch (exception) {
|
||||
console.log(sshAdd.toString());
|
||||
console.log(exception);
|
||||
throw exception;
|
||||
}
|
||||
console.log(sshAdd);
|
||||
child_process.execFileSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit' });
|
||||
|
||||
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|\')/);
|
||||
|
|
9
index.js
9
index.js
|
@ -76,14 +76,7 @@ try {
|
|||
// Load key into agent
|
||||
var sshAdd;
|
||||
|
||||
try {
|
||||
let sshAdd = child_process.execSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': 'askpass' } });
|
||||
} catch (exception) {
|
||||
console.log(sshAdd.toString());
|
||||
console.log(exception);
|
||||
throw exception;
|
||||
}
|
||||
console.log(sshAdd);
|
||||
child_process.execFileSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit' });
|
||||
|
||||
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|\')/);
|
||||
|
|
Loading…
Reference in a new issue