Problem
On a clean lint cache with a host go already on PATH, make lint leaves the Make variable GO unset. The golangci-lint bootstrap recipe expands $(GO) install ... to BSD install ..., which exits 64 instead of installing the pinned linter.
Both fresh validators for PR #677 reproduced this independently. The same conditional structure exists on current main@upstream, so this is not a regression in PR #677.
Reproduction
rm -f .cache/local/bin/golangci-lint
which go
make lint
Observed command shape/error: BSD install ...@v2.12.2, exit 64.
make lint GO-VERSION=1.26.5 bootstraps the pinned Go/linter and then passes with zero issues.
Cause
The Makefile includes $M/go.mk only when host Go is absent or GO-VERSION is explicitly provided. With host Go present, neither GO nor the go helper rules are defined, but the lint install recipe still invokes $(GO) install.
Expected
make lint should use the discovered host go or otherwise define the Go command consistently, while retaining the pinned golangci-lint version and cache paths.
Problem
On a clean lint cache with a host
goalready onPATH,make lintleaves the Make variableGOunset. The golangci-lint bootstrap recipe expands$(GO) install ...to BSDinstall ..., which exits 64 instead of installing the pinned linter.Both fresh validators for PR #677 reproduced this independently. The same conditional structure exists on current
main@upstream, so this is not a regression in PR #677.Reproduction
Observed command shape/error: BSD
install ...@v2.12.2, exit 64.make lint GO-VERSION=1.26.5bootstraps the pinned Go/linter and then passes with zero issues.Cause
The Makefile includes
$M/go.mkonly when host Go is absent orGO-VERSIONis explicitly provided. With host Go present, neitherGOnor the go helper rules are defined, but the lint install recipe still invokes$(GO) install.Expected
make lintshould use the discovered hostgoor otherwise define the Go command consistently, while retaining the pinned golangci-lint version and cache paths.