Skip to content

install/build: require macOS 26 with a clear early error - #9

Merged
emarref merged 1 commit into
mainfrom
fix/macos-version-guard
Jul 27, 2026
Merged

install/build: require macOS 26 with a clear early error#9
emarref merged 1 commit into
mainfrom
fix/macos-version-guard

Conversation

@emarref

@emarref emarref commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Closes #8

Problem

install.sh checked Darwin + arm64 but not the macOS version. maic needs FoundationModels (macOS 26+, per Package.swift), so on macOS 25 or earlier the install succeeded and the binary then failed to launch with a cryptic dyld version error instead of a friendly, actionable message.

Change

Add a sw_vers-based guard to both scripts, failing fast before any network/build step:

install: maic requires macOS 26 or later (detected 15.5).
  • install.sh — immediately after the arm64 check, using the existing err() helper.
  • build.sh — before swift build, using echo … >&2; exit 1 (no err() helper there).

Fails safe: if sw_vers is missing or returns non-numeric/empty, [ "" -ge 26 ] errors (silenced via 2>/dev/null) and the abort still fires.

Verification

  • bash -n install.sh and zsh -n build.sh pass.
  • Stubbed sw_vers: 15.5/25.9 → abort (exit 1) with the message, before any download/build; 26.0/26.5.2/27.1 → proceed.
  • No behavior change on macOS 26+.
  • Full Swift suite (swift run maicTests) green.
  • Two-axis /code-review (standards + spec) came back clean.

Out of scope: runtime availability messaging (already handled via SystemLanguageModel.default.availability).

install.sh checked Darwin + arm64 but not the OS version. maic needs
FoundationModels (macOS 26+), so on older macOS the install succeeded
and the binary then failed to launch with a cryptic dyld version error.

Add a sw_vers guard to both install.sh and build.sh so they fail fast
with 'requires macOS 26 or later (detected <ver>)' instead.

Closes #8
@emarref
emarref merged commit e6ce15c into main Jul 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install.sh: guard against macOS < 26 for a clear error

1 participant