mirror of
https://github.com/deployphp/action.git
synced 2024-11-23 04:19:02 +00:00
Check if we need to create SSH directory. (#6)
This commit is contained in:
parent
938f1ee6ef
commit
43c2295b74
5
index.js
5
index.js
@ -14,7 +14,10 @@ void function main() {
|
|||||||
|
|
||||||
function ssh() {
|
function ssh() {
|
||||||
let ssh = `${process.env['HOME']}/.ssh`
|
let ssh = `${process.env['HOME']}/.ssh`
|
||||||
fs.mkdirSync(ssh)
|
|
||||||
|
if (!fs.existsSync(ssh)) {
|
||||||
|
fs.mkdirSync(ssh)
|
||||||
|
}
|
||||||
|
|
||||||
let authSock = '/tmp/ssh-auth.sock'
|
let authSock = '/tmp/ssh-auth.sock'
|
||||||
execa.sync('ssh-agent', ['-a', authSock])
|
execa.sync('ssh-agent', ['-a', authSock])
|
||||||
|
Loading…
Reference in New Issue
Block a user