From 637f9c791e2459e56ab20a080b0e96feeeed0e3f Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Mon, 1 Mar 2021 08:15:05 +0000 Subject: [PATCH] Fix execFileSync call --- dist/index.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 91db824..650b9bb 100644 --- a/dist/index.js +++ b/dist/index.js @@ -193,7 +193,7 @@ try { // Load key into agent var sshAdd; - child_process.execFileSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit' }); + 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|\')/); diff --git a/index.js b/index.js index 3f8995b..0557e58 100644 --- a/index.js +++ b/index.js @@ -76,7 +76,7 @@ try { // Load key into agent var sshAdd; - child_process.execFileSync(`ssh-add ${keyFile}`, { env: { 'DISPLAY': 'fake', 'SSH_PASS': token, 'SSH_ASKPASS': process.cwd() + '/askpass.exe' }, stdio: 'inherit' }); + 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|\')/);