Skip to content

golangci-lint fails because it cannot find go in $PATH #464

Open
@shackra

Description

@shackra

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    flakeRelated to running in pure environments

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions