Skip to content

Commit 29da082

Browse files
committed
fix(server): distinguish the Antigravity CLI from the missing ACP runtime
1 parent 6c58362 commit 29da082

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎apps/server/src/provider/AntigravityInstallation.ts‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,17 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma
400400
.map((directory) => path.resolve(directory, binary));
401401
};
402402

403+
const cliOnPath = Effect.fn("AntigravityInstallation.cliOnPath")(function* (
404+
processEnvironment?: NodeJS.ProcessEnv,
405+
) {
406+
for (const name of platform === "win32" ? ["agy.exe", "agy.cmd"] : ["agy"]) {
407+
for (const candidate of pathCandidates(name, processEnvironment)) {
408+
if (yield* executableFile(candidate)) return true;
409+
}
410+
}
411+
return false;
412+
});
413+
403414
const resolve: AntigravityInstallationService["resolve"] = Effect.fn(
404415
"AntigravityInstallation.resolve",
405416
)(
@@ -427,6 +438,12 @@ export const makeAntigravityInstallation = Effect.fn("AntigravityInstallation.ma
427438
const selected = yield* fromExternal(candidate, "path");
428439
if (selected) return selected;
429440
}
441+
if (releaseAsset && (yield* cliOnPath(processEnvironment))) {
442+
return yield* installationError(
443+
"resolve",
444+
"The Antigravity CLI is installed, but T3 Code runs the separate Antigravity ACP agent. Install it in this environment or set a custom executable path.",
445+
);
446+
}
430447
return yield* installationError(
431448
"resolve",
432449
releaseAsset

0 commit comments

Comments
 (0)