Skip to content

Commit 7c7f53f

Browse files
authored
Merge pull request #21 from sourcetoad/issue-19
feat: don't crash if .ssh already exists
2 parents 5ef0d37 + cff707e commit 7c7f53f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ const key = core.getInput('key');
385385
console.log(`Attempting to create ${socketPath}...`);
386386
try {
387387
execSync(
388-
'mkdir ~/.ssh && ' +
388+
'mkdir -p ~/.ssh && ' +
389389
`ssh-keyscan${port ? ` -p ${port}` : ''} "${host}" >> ~/.ssh/known_hosts && ` +
390390
`eval $(ssh-agent -a "${socketPath}") && ` +
391391
`echo "${key}" | base64 -d | ssh-add -`

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const key = core.getInput('key');
1010
console.log(`Attempting to create ${socketPath}...`);
1111
try {
1212
execSync(
13-
'mkdir ~/.ssh && ' +
13+
'mkdir -p ~/.ssh && ' +
1414
`ssh-keyscan${port ? ` -p ${port}` : ''} "${host}" >> ~/.ssh/known_hosts && ` +
1515
`eval $(ssh-agent -a "${socketPath}") && ` +
1616
`echo "${key}" | base64 -d | ssh-add -`

0 commit comments

Comments
 (0)