Skip to content

Commit c17d254

Browse files
authored
fixing relative path and permission (#24)
* fix relative path * fix chmod 600 .ssh/known_hosts and .ssh/config
1 parent 9eab206 commit c17d254

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ function ssh() {
2929
const knownHosts = core.getInput('known-hosts')
3030
if (knownHosts !== '') {
3131
fs.appendFileSync(`${ssh}/known_hosts`, knownHosts)
32-
fs.chmodSync(`${ssh}/known_hosts`, '644')
32+
fs.chmodSync(`${ssh}/known_hosts`, '600')
3333
} else {
3434
fs.appendFileSync(`${ssh}/config`, `StrictHostKeyChecking no`)
35+
fs.chmodSync(`${ssh}/config`, '600')
3536
}
3637

3738
const sshConfig = core.getInput('ssh-config')
3839
if (sshConfig !== '') {
3940
fs.writeFile(`${ssh}/config`, sshConfig)
41+
fs.chmodSync(`${ssh}/config`, '600')
4042
}
4143
}
4244

@@ -52,7 +54,7 @@ function dep() {
5254
if (!dep) {
5355
execa.commandSync('curl -LO https://deployer.org/deployer.phar')
5456
execa.commandSync('sudo chmod +x deployer.phar')
55-
dep = 'deployer.phar'
57+
dep = './deployer.phar'
5658
}
5759

5860
const subprocess = execa(dep, split(core.getInput('dep')))

0 commit comments

Comments
 (0)