Ensure .ssh directory exists before creating SSH identity file

This commit is contained in:
Bastian (BaM)
2025-09-14 12:46:36 +02:00
parent 09b4acd110
commit 8e618e59db

View File

@@ -83,7 +83,7 @@ local function createSSHKeyFilesFromEnv()
end end
-- Ensure .ssh directory exists -- Ensure .ssh directory exists
local ssh_dir = SSH_IDENTITY_FILE:match("^(.*)/[^/]+$ local ssh_dir = SSH_IDENTITY_FILE:match("^(.*)/[^/]+$")
if ssh_dir then if ssh_dir then
os.execute(("mkdir -p %q && chmod 700 %q"):format(ssh_dir, ssh_dir)) os.execute(("mkdir -p %q && chmod 700 %q"):format(ssh_dir, ssh_dir))
end end