Use exec
This commit is contained in:
parent
4d491fcb08
commit
9b7e80db62
2 changed files with 2 additions and 2 deletions
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -195,7 +195,7 @@ try {
|
||||||
// Load key into agent
|
// Load key into agent
|
||||||
console.log('Load key');
|
console.log('Load key');
|
||||||
//let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' });
|
//let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' });
|
||||||
let sshAdd = child_process.execFileSync(`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` } });
|
||||||
// input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] });
|
// input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] });
|
||||||
//sshAdd.stdin.write(token + "\n");
|
//sshAdd.stdin.write(token + "\n");
|
||||||
//sshAdd.stdin.end();
|
//sshAdd.stdin.end();
|
||||||
|
|
2
index.js
2
index.js
|
@ -78,7 +78,7 @@ try {
|
||||||
// Load key into agent
|
// Load key into agent
|
||||||
console.log('Load key');
|
console.log('Load key');
|
||||||
//let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' });
|
//let sshAdd = child_process.execSync(`echo "${token}" | ssh-add "${keyFile}"`, { stdio: 'inherit' });
|
||||||
let sshAdd = child_process.execFileSync(`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` } });
|
||||||
// input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] });
|
// input: token + "\n", stdio: ['pipe', 'inherit', 'inherit'] });
|
||||||
//sshAdd.stdin.write(token + "\n");
|
//sshAdd.stdin.write(token + "\n");
|
||||||
//sshAdd.stdin.end();
|
//sshAdd.stdin.end();
|
||||||
|
|
Loading…
Reference in a new issue