fix(rclone): correctly propagate RCLONE_NO_CHECK_CERTIFICATE env variable (#692)

Closes #688
This commit is contained in:
Nico 2026-03-21 20:42:22 +01:00 committed by GitHub
parent 618f37e250
commit 3c9620f973
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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", () => {
const baseSftpConfig = withCustomPassword({
backend: "sftp" as const,

View file

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