From 0cba73bfc6d72d1975e1cc44a0ccc2563e320251 Mon Sep 17 00:00:00 2001 From: matt wilkie Date: Wed, 12 Nov 2025 15:15:46 -0700 Subject: [PATCH] docs: don't auto-install Go in Windows installer; instruct user instead (fixes #292) (#302) --- README.md | 11 +++++++---- install.ps1 | 46 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 47 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index be3ece74..9a33c3b6 100644 --- a/README.md +++ b/README.md @@ -91,20 +91,23 @@ go build -o bd ./cmd/bd npm install -g @beads/bd ``` -**Quick install (all platforms):** +**Quick install (macOS / Linux):** ```bash curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash ``` +**Quick install (Windows - PowerShell):** +```powershell +irm https://raw.githubusercontent.com/steveyegge/beads/main/install.ps1 | iex +``` + **Homebrew (macOS/Linux):** ```bash brew tap steveyegge/beads brew install bd ``` -**Other platforms and methods:** See [docs/INSTALLING.md](docs/INSTALLING.md) for Windows, Arch Linux, and manual installation. - -**IDE Integration:** See [docs/INSTALLING.md](docs/INSTALLING.md) for Claude Code plugin and MCP server setup. +For full, platform-specific instructions (Windows, Arch Linux, manual builds, IDE integrations, etc.) see the canonical guide in [docs/INSTALLING.md](docs/INSTALLING.md). **Claude Code for Web:** See [npm-package/CLAUDE_CODE_WEB.md](npm-package/CLAUDE_CODE_WEB.md) for SessionStart hook setup. diff --git a/install.ps1 b/install.ps1 index 235c3f72..d34451b0 100644 --- a/install.ps1 +++ b/install.ps1 @@ -245,19 +245,53 @@ if ($goSupport.Present) { Write-WarningMsg "Go not found on PATH." } +function Print-GoInstallInstructions { + Write-Host "\nTo install Go (required: 1.24+), run one of the following depending on what you have installed:" -ForegroundColor Cyan + + $winget = Get-Command winget -ErrorAction SilentlyContinue + $choco = Get-Command choco -ErrorAction SilentlyContinue + $scoop = Get-Command scoop -ErrorAction SilentlyContinue + + if ($winget) { + Write-Host " winget install --exact --id GoLang.Go" -ForegroundColor Yellow + Write-Host " (run as an elevated/admin terminal if required)\n" -ForegroundColor Cyan + return + } + + if ($choco) { + Write-Host " choco install golang -y" -ForegroundColor Yellow + Write-Host " (requires an elevated/admin PowerShell)\n" -ForegroundColor Cyan + return + } + + if ($scoop) { + Write-Host " scoop install go" -ForegroundColor Yellow + Write-Host " (scoop installs to your user profile; no admin required)\n" -ForegroundColor Cyan + return + } + + Write-Host " Download and run the official installer from:" -ForegroundColor Cyan + Write-Host " https://go.dev/dl/" -ForegroundColor Yellow + Write-Host "\nAfter installing Go 1.24+, re-run this installer (the exact same command you used to invoke this script)." -ForegroundColor Cyan +} + $installed = $false if ($goSupport.Present -and $goSupport.MeetsRequirement) { $installed = Install-WithGo if (-not $installed) { - Write-WarningMsg "Falling back to source build..." + Write-WarningMsg "go install failed; attempting to build from source..." + $installed = Install-FromSource } } elseif ($goSupport.Present -and -not $goSupport.MeetsRequirement) { - Write-Err "Go 1.24 or newer is required (found: $($goSupport.RawVersion)). Please upgrade Go or use the fallback build." -} - -if (-not $installed) { - $installed = Install-FromSource + Write-Err "Go 1.24 or newer is required (found: $($goSupport.RawVersion)). Please upgrade Go or use your package manager." + Print-GoInstallInstructions + exit 1 +} else { + # No Go present - do not attempt to auto-download or auto-install Go. + Write-Err "Go is not installed. bd requires Go 1.24+ to build from source." + Print-GoInstallInstructions + exit 1 } if ($installed) {