mirror of
https://github.com/webfactory/ssh-agent.git
synced 2026-03-27 13:29:06 +08:00
Fix syntax
This commit is contained in:
4
dist/index.js
vendored
4
dist/index.js
vendored
@@ -195,8 +195,10 @@ 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' });
|
||||||
|
var sshAdd;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let sshAdd = child_process.execSync(`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` } });
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
console.log(sshAdd);
|
console.log(sshAdd);
|
||||||
console.log(exception);
|
console.log(exception);
|
||||||
|
|||||||
4
index.js
4
index.js
@@ -78,8 +78,10 @@ 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' });
|
||||||
|
var sshAdd;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let sshAdd = child_process.execSync(`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` } });
|
||||||
} catch (exception) {
|
} catch (exception) {
|
||||||
console.log(sshAdd);
|
console.log(sshAdd);
|
||||||
console.log(exception);
|
console.log(exception);
|
||||||
|
|||||||
Reference in New Issue
Block a user