refactor(macos): bundle single relay binary
This commit is contained in:
@@ -12,11 +12,8 @@ describe("ensureClawdisCliOnPath", () => {
|
||||
try {
|
||||
const relayDir = path.join(tmp, "Relay");
|
||||
await fs.mkdir(relayDir, { recursive: true });
|
||||
const gatewayPath = path.join(relayDir, "clawdis-gateway");
|
||||
const cliPath = path.join(relayDir, "clawdis");
|
||||
await fs.writeFile(gatewayPath, "#!/bin/sh\nexit 0\n", "utf-8");
|
||||
await fs.writeFile(cliPath, "#!/bin/sh\necho ok\n", "utf-8");
|
||||
await fs.chmod(gatewayPath, 0o755);
|
||||
await fs.chmod(cliPath, 0o755);
|
||||
|
||||
const originalPath = process.env.PATH;
|
||||
@@ -25,7 +22,7 @@ describe("ensureClawdisCliOnPath", () => {
|
||||
delete process.env.CLAWDIS_PATH_BOOTSTRAPPED;
|
||||
try {
|
||||
ensureClawdisCliOnPath({
|
||||
execPath: gatewayPath,
|
||||
execPath: cliPath,
|
||||
cwd: tmp,
|
||||
homeDir: tmp,
|
||||
platform: "darwin",
|
||||
|
||||
@@ -55,7 +55,7 @@ function candidateBinDirs(opts: EnsureClawdisPathOpts): string[] {
|
||||
|
||||
const candidates: string[] = [];
|
||||
|
||||
// Bun bundled (macOS app): `clawdis` is shipped next to `clawdis-gateway`.
|
||||
// Bun bundled (macOS app): `clawdis` lives in the Relay dir (process.execPath).
|
||||
try {
|
||||
const execDir = path.dirname(execPath);
|
||||
const siblingClawdis = path.join(execDir, "clawdis");
|
||||
|
||||
Reference in New Issue
Block a user