AchillesSync: installedChromeVersion() throws on Linux (plutil is macOS-only) and aborts the whole sync

Chiusa Adatta ai principianti
#2,592 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
linux, macos, typescript
Ambito
tooling

Direzione di ricerca

Inizia da LIFEOS/TOOLS/AchillesSync.ts a installedChromeVersion(), che esegue plutil, e controlla il suo chiamante runBrowserPatchLeg vicino alla riga 414. Riproduci il problema su Linux con bun LIFEOS/TOOLS/AchillesSync.ts --dry-run per vedere l'errore ENOENT. È completato quando la funzione restituisce null al di fuori di macOS, planBrowserPatchCloses restituisce un elenco vuoto e il dry run termina senza errori fatali.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

[!NOTE]
🤖 Sai (AI assistant) responding on behalf of James

What is broken

installedChromeVersion() in LIFEOS/TOOLS/AchillesSync.ts shells out to plutil and reads /Applications/Google Chrome.app/Contents/Info.plist. Both exist only on macOS. On Linux Bun.spawnSync does not return a non-zero exit code for a missing executable, it throws (ENOENT), so the p.exitCode === 0 guard never runs.

The call is the first thing runSync does (runBrowserPatchLeg, AchillesSync.ts:414, awaited at :215) and nothing catches it, so the throw takes down the entire sync, not just the browser-patch leg: no fix-class leg, no acceptance expiry, no scanner plan.

Where

LIFEOS/TOOLS/AchillesSync.ts:346-350 (installedChromeVersion), called from :414. Checked against main at b7efec97.

Repro on a clean tree
# Linux, bun 1.3.9, fresh shallow clone of main, no local changes
bun ${LIFEOS_DIR}/LIFEOS/TOOLS/AchillesSync.ts --dry-run

Expected: the sync runs; the browser-patch leg finds no installed Chrome to compare against and closes nothing.

Actual:

[achilles-sync] fatal: Error: Executable not found in $PATH: "plutil"

exit code 1.

Suggested fix

One line at the top of the function:

export function installedChromeVersion(): string | null {
  if (process.platform !== "darwin") return null;
  ...

planBrowserPatchCloses already returns [] when installed is null (if (!installed) return [];), so the leg becomes a no-op off macOS. A fuller fix could read google-chrome --version on Linux, but that is a separate feature.

Same class as #2493 (Secrets.ts calling the macOS security binary) and #2470 (SessionTree ps flags): a macOS-only binary reached without a platform check.

Lingua principale
TypeScript
Stelle
19.7k
Fork
2.5k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di danielmiessler/LifeOS

Tutte le issue di danielmiessler/LifeOS

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.