golangci-lint fails because it cannot find `go` in $PATH
shackra opened this issue · 3 comments
shackra commented
This happens when running nix flake check
.
golangci-lint............................................................Failed
- hook id: golangci-lint
- exit code: 3
WARN Failed to discover go env: failed to run 'go env -json GOCACHE GOROOT': exec: "go": executable file not found in $PATH
ERRO Running error: context loading failed: failed to load packages: failed to load packages: failed to load with go/packages: err: go command required, not found: exec: "go": executable file not found in $PATH: stderr:
This may be related to the fact that flakes do not admit environment variables. It goes well as a pre-commit-hook, thought.