Skip to content

Commit 8456fb8

Browse files
committed
test(cloud-workers): resolve real rsync before wrapping
1 parent 535b785 commit 8456fb8

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎src/gateway/worker-environments/workspace-rsync-path.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ describe.skipIf(process.platform === "win32")("workspace rsync receiver path", (
4949
`import { tsImport } from ${JSON.stringify(tsxApi)};\nawait tsImport(${JSON.stringify(sourceEntry)}, import.meta.url);\n`,
5050
);
5151

52-
const rsync = process.platform === "darwin" ? "/usr/bin/rsync" : "rsync";
52+
const resolvedRsync = await runCommandWithTimeout(["sh", "-c", "command -v rsync"], {
53+
timeoutMs: 10_000,
54+
});
55+
expect(resolvedRsync).toMatchObject({ termination: "exit", code: 0 });
56+
const rsync = resolvedRsync.stdout.trim();
5357
await fs.writeFile(
5458
path.join(tools, "rsync"),
5559
'#!/bin/sh\nset -eu\nprintf "%s\\0" "$@" > "$OPENCLAW_TEST_RECEIVER_ARGV"\nexec "$OPENCLAW_TEST_REAL_RSYNC" "$@"\n',

0 commit comments

Comments
 (0)