fix(rclone): correctly propagate RCLONE_NO_CHECK_CERTIFICATE env variable

Closes #688
This commit is contained in:
Nicolas Meienberger 2026-03-21 18:43:35 +01:00
parent df0d9da4a3
commit 0082382c57
2 changed files with 21 additions and 0 deletions

View file

@ -261,6 +261,23 @@ describe("buildEnv", () => {
}); });
}); });
describe("rclone backend", () => {
test("sets RCLONE_NO_CHECK_CERTIFICATE when insecureTls is enabled", async () => {
const env = await buildEnvForTest(
withCustomPassword({
backend: "rclone" as const,
remote: "my-remote",
path: "/backups",
insecureTls: true,
}),
"org-1",
);
expect(env._INSECURE_TLS).toBe("true");
expect(env.RCLONE_NO_CHECK_CERTIFICATE).toBe("true");
});
});
describe("sftp backend", () => { describe("sftp backend", () => {
const baseSftpConfig = withCustomPassword({ const baseSftpConfig = withCustomPassword({
backend: "sftp" as const, backend: "sftp" as const,

View file

@ -142,6 +142,10 @@ export const buildEnv = async (
if (config.insecureTls) { if (config.insecureTls) {
env._INSECURE_TLS = "true"; env._INSECURE_TLS = "true";
if (config.backend === "rclone") {
env.RCLONE_NO_CHECK_CERTIFICATE = "true";
}
} }
return env; return env;