Skip to content

Commit bb02cbd

Browse files
agorischekCopilot
andauthored
fix(host): run Tailscale through its real path (#703)
Tailscale.app's binary crashes ("The current bundleIdentifier is unknown to the registry") when invoked through a symlink such as /usr/local/bin/tailscale. The helper adopts the login shell PATH, which can resolve to that symlink, so every status check crashed and Ace reported "The team's services need Tailscale running on this Mac." Why: apps/host/src/tailnet.ts#function executable | Tailscale.app's binary must be run by its real path, never through a symlink, or it crashes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1cbb2262-7e0b-45cd-a29e-d68510600884
1 parent b3e851a commit bb02cbd

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/host/src/tailnet.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/** The tailnet is the team: it says who a peer is and which machines can host channels. */
2-
import { existsSync } from "node:fs";
2+
import { existsSync, realpathSync } from "node:fs";
33
import { isIP } from "node:net";
44
import { homedir } from "node:os";
55
import { join } from "node:path";
@@ -27,7 +27,8 @@ export type Machine = { name: string; login: string; address: string; dns: strin
2727

2828
function executable(): string | undefined {
2929
const path = Bun.which("tailscale", { PATH: process.env.PATH });
30-
if (path) return path;
30+
// Tailscale.app's binary crashes when run through a symlink such as /usr/local/bin/tailscale.
31+
if (path) return realpathSync(path);
3132
if (process.platform !== "darwin") return;
3233
return ["/Applications", join(homedir(), "Applications")]
3334
.map((dir) => join(dir, "Tailscale.app", "Contents", "MacOS", "Tailscale"))

0 commit comments

Comments
 (0)