From c345bd40ae05980926987f6b0d278109d32338d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Thu, 23 Jul 2026 00:48:44 +0000 Subject: [PATCH] skip pi install when the binary is already present Co-Authored-By: Claude Opus 4.8 --- src/servers/bootstrap.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/servers/bootstrap.ts b/src/servers/bootstrap.ts index a648e94c..ef29704d 100644 --- a/src/servers/bootstrap.ts +++ b/src/servers/bootstrap.ts @@ -24,6 +24,15 @@ async function findPiPackageDir(): Promise { } async function ensurePiInstalled(): Promise { + // If the `pi` binary is already on hand (e.g. a newer, manually-installed @earendil-works build), + // treat Pi as installed. Otherwise the old @mariozechner package gets reinstalled over it every boot + // and fails with EEXIST — noisy, and the "model discovery will not work" warning is a false alarm. + const localPi = join(homedir(), '.local', 'bin', 'pi'); + if (Bun.which('pi') || (await Bun.file(localPi).exists())) { + console.log('[bootstrap] Pi already available — skipping install'); + return true; + } + const dir = await findPiPackageDir(); if (!dir) return false; try {