mirror of
https://github.com/webfactory/ssh-agent.git
synced 2026-11-02 05:01:19 +03:00
Use absolute path for askpass.exe
This commit is contained in:
1 parent
c91aeeb123
commit
18f53866de
2 files changed
+2
-16
No files matched your search
Vendored
+1
-8
@@ -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|\')/);
|
||||
|
||||
@@ -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|\')/);
|
||||
|
||||
Reference in new issue
Block a user