skip pi install when the binary is already present

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 00:48:44 +00:00
co-authored by Claude Opus 4.8
parent fcee091b53
commit c345bd40ae
+9
View File
@@ -24,6 +24,15 @@ async function findPiPackageDir(): Promise<string | null> {
}
async function ensurePiInstalled(): Promise<boolean> {
// 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 {