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 {