Skip to content

fix: check for go in setup and install via Homebrew if missing - #44

Merged
alohaninja merged 2 commits into
mattthewong:mainfrom
alohaninja:fix/setup-check-go
Aug 14, 2026
Merged

fix: check for go in setup and install via Homebrew if missing#44
alohaninja merged 2 commits into
mattthewong:mainfrom
alohaninja:fix/setup-check-go

Conversation

@alohaninja

@alohaninja alohaninja commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

make start (via the setup target) checks for brew, sox/ffmpeg, and whisper-cpp, but never checks for Go itself. On a machine without Go installed, start proceeds to the build step and fails with a cryptic error:

go build -o bin/vox ./cmd/vox
make: go: No such file or directory
make: *** [build] Error 1
pr44-setup-check-go

Change

  • Add a go existence check to the setup target that installs Go via Homebrew when missing, matching the existing pattern used for sox and whisper-cpp.
  • Update the README's dependency list to include go.

The check is placed right after the brew guard since Go is required before the build step. Idempotent — skipped when Go is already on PATH.

Validation (local)

  • make check-fmt — clean
  • make build — succeeds
  • make lint (go vet) — clean
  • Simulated the missing-go path by masking go from PATH; confirmed the install branch fires (brew install go) and is skipped when Go is present.

Fixes #43

make start (via setup) checked for brew, sox/ffmpeg, and whisper-cpp but
not go itself. On a machine without Go, start would proceed to the build
step and fail with a cryptic error:

  go build -o bin/vox ./cmd/vox
  make: go: No such file or directory
  make: *** [build] Error 1

Add a go existence check to the setup target that installs go via
Homebrew when missing, matching the existing pattern for the other
system dependencies. Update the README dep list to match.

Fixes mattthewong#43
Address PR review feedback:
- Quick-start Requirements line listed Go 1.24+ as a hard prerequisite,
  contradicting the auto-install step. Reframe to macOS + Homebrew as the
  only true requirements; go/sox/whisper-cpp are installed automatically.
- Manual setup 'brew install' omitted go, so users following the manual
  path would still hit the cryptic build error this PR fixes. Add go.
@alohaninja

alohaninja commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the two README suggestions in 14482cf:

  • Requirements line — reframed to macOS + Homebrew as the only true requirements, with go/sox/whisper-cpp noted as auto-installed. Resolves the contradiction with the "handles everything" list.
  • Manual setup — added go to brew install go sox whisper-cpp so the manual path doesn't hit the same cryptic build error this PR fixes.

On the Go version nit: leaving existence-only to stay consistent with the sox/whisper-cpp checks — Homebrew installs current Go (1.24+), and Go itself emits a clear version-mismatch error otherwise, so an explicit go.mod version gate would be inconsistent scope here.

@alohaninja
alohaninja merged commit 81a20a2 into mattthewong:main Aug 14, 2026
4 checks 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.

Make start does not check for go

2 participants