Ensure .ssh directory exists before creating SSH identity file
This commit is contained in:
@@ -83,7 +83,7 @@ local function createSSHKeyFilesFromEnv()
|
||||
end
|
||||
|
||||
-- Ensure .ssh directory exists
|
||||
local ssh_dir = SSH_IDENTITY_FILE:match("^(.*)/[^/]+$
|
||||
local ssh_dir = SSH_IDENTITY_FILE:match("^(.*)/[^/]+$")
|
||||
if ssh_dir then
|
||||
os.execute(("mkdir -p %q && chmod 700 %q"):format(ssh_dir, ssh_dir))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user