skip pi install when the binary is already present
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,15 @@ async function findPiPackageDir(): Promise<string | null> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function ensurePiInstalled(): Promise<boolean> {
|
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();
|
const dir = await findPiPackageDir();
|
||||||
if (!dir) return false;
|
if (!dir) return false;
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user