TemplateTest/lune/manager/replicators/ssh.luau
2025-04-05 18:29:25 +02:00

16 lines
528 B
Text

--!strict
local process = require("@lune/process")
local common = require("../common")
local result = require("@pkg/result")
local function ssh_replicator(dist_folder: string, remote_output: string): result.Identity<nil>
local copy_result = process.spawn("scp", { "-r", "-O", dist_folder, remote_output }, { stdio = "forward" })
if not copy_result.ok then
return result(false, `Failed to copy files:\n{copy_result.stderr}`)
end
return result(true, nil)
end
return ssh_replicator :: common.Replicator