diff --git a/scripts/release/cpanel-deploy-lib.mjs b/scripts/release/cpanel-deploy-lib.mjs index 3c391ec8..847b8eae 100644 --- a/scripts/release/cpanel-deploy-lib.mjs +++ b/scripts/release/cpanel-deploy-lib.mjs @@ -440,7 +440,10 @@ export function createLftpTransport(config, dependencies = {}) { async function run(commands) { try { - await runner("lftp", ["-f", "/dev/stdin"], { + // lftp reads commands from standard input when no command source is + // specified. Avoid `-f /dev/stdin`: some hosted runners expose that + // path as a non-reopenable pipe, causing lftp's `source` command to fail. + await runner("lftp", [], { input: buildLftpScript(config, commands), label: "FTPS operation", }); diff --git a/tests/unit/cpanel-deploy.spec.js b/tests/unit/cpanel-deploy.spec.js index 7071ecc3..f581230e 100644 --- a/tests/unit/cpanel-deploy.spec.js +++ b/tests/unit/cpanel-deploy.spec.js @@ -247,7 +247,7 @@ describe("secure FTPS archive upload", () => { sha256: hash, }); expect(calls).toHaveLength(2); - expect(calls[0].args).toEqual(["-f", "/dev/stdin"]); + expect(calls[0].args).toEqual([]); expect(calls[0].input).toContain(`${path.basename(archivePath)}.part`); expect(calls[0].input).toContain("get 'archives/"); expect(calls[1].input).toContain(