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

Closed Beginner friendly
#2,592 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 9 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
linux, macos, typescript
Domain
tooling

Research direction

Start in LIFEOS/TOOLS/AchillesSync.ts at installedChromeVersion(), which shells out to plutil, and check its caller runBrowserPatchLeg near line 414. Reproduce on Linux with bun LIFEOS/TOOLS/AchillesSync.ts --dry-run to see the ENOENT throw. Done when the function returns null off macOS, planBrowserPatchCloses returns an empty list, and the dry run completes without a fatal error.

Written by the indexing model from the issue text.

Description

[!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.

Dominant language
TypeScript
Stars
19.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from danielmiessler/LifeOS

All issues in danielmiessler/LifeOS

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.