diff --git a/README.md b/README.md index 7b5a86ef..26d82bcd 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ The installer will: ### Manual Install ```bash -# Using go install (requires Go 1.21+) +# Using go install (requires Go 1.23+) go install github.com/steveyegge/beads/cmd/bd@latest # Or build from source diff --git a/install.sh b/install.sh index 277cf2a1..0f3486a3 100755 --- a/install.sh +++ b/install.sh @@ -62,10 +62,27 @@ detect_platform() { echo "${os}-${arch}" } -# Check if Go is installed +# Check if Go is installed and meets minimum version check_go() { if command -v go &> /dev/null; then + local go_version=$(go version | awk '{print $3}' | sed 's/go//') log_info "Go detected: $(go version)" + + # Extract major and minor version numbers + local major=$(echo "$go_version" | cut -d. -f1) + local minor=$(echo "$go_version" | cut -d. -f2) + + # Check if Go version is 1.23 or later + if [ "$major" -eq 1 ] && [ "$minor" -lt 23 ]; then + log_error "Go 1.23 or later is required (found: $go_version)" + echo "" + echo "Please upgrade Go:" + echo " - Download from https://go.dev/dl/" + echo " - Or use your package manager to update" + echo "" + return 1 + fi + return 0 else return 1 @@ -158,7 +175,7 @@ build_from_source() { offer_go_installation() { log_warning "Go is not installed" echo "" - echo "bd requires Go 1.21 or later. You can:" + echo "bd requires Go 1.23 or later. You can:" echo " 1. Install Go from https://go.dev/dl/" echo " 2. Use your package manager:" echo " - macOS: brew install go"