Skip to content

Installing staticcheck fails because golang is not set #598

@eccles

Description

@eccles

staticcheck fails to install because it cannot find the version of golang specified in the tool-versions file:

tool-versions:

golang 1.24.3
just 1.40.0
staticcheck 2025.1.1

Github-action:

- name: Setup ASDF VM
  uses: asdf-vm/actions/install@v4
  with:
     asdf_version: 0.17.0

Output of CI:

Run asdf-vm/actions/install@v4
/usr/bin/curl -sSL -o /tmp/asdf-v0.17.0-linux-amd64.tar.gz https://github.com/asdf-vm/asdf/releases/download/v0.17.0/asdf-v0.17.0-linux-amd64.tar.gz
/usr/bin/tar -C /home/runner/.asdf/bin -xzf /tmp/asdf-v0.17.0-linux-amd64.tar.gz
/home/runner/.asdf/bin/asdf plugin list
No plugins installed
Installing golang plugin...
/home/runner/.asdf/bin/asdf plugin add golang
Installing just plugin...
/home/runner/.asdf/bin/asdf plugin add just
Installing staticcheck plugin...
/home/runner/.asdf/bin/asdf plugin add staticcheck
/home/runner/.asdf/bin/asdf install
Platform 'linux' supported!
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  7 74.9M    7 5647k    0     0  27.3M      0  0:00:02 --:--:--  0:00:02 27.3M
100 74.9M  100 74.9M    0     0   134M      0 --:--:-- --:--:-- --:--:--  134M
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100    64  100    64    0     0    332      0 --:--:-- --:--:-- --:--:--   333
verifying checksum
/home/runner/.asdf/downloads/golang/1.24.3/archive.tar.gz: OK
checksum verified
* Downloading just 1.40.0 from https://github.com/casey/just/releases/download/1.40.0/just-1.40.0-x86_64-unknown-linux-musl.tar.gz
just 1.40.0 installation was successful!
* Downloading staticcheck release 2025.1.1...
No version is set for command go
Consider adding one of the following versions in your config file at /home/runner/.asdf/downloads/staticcheck/2025.1.1/cmd/staticcheck/.tool-versions
golang 1.24.3
asdf-staticcheck: Could not build staticcheck from /home/runner/.asdf/downloads/staticcheck/2025.1.1
failed to run download callback: exit status 1
Error: Action failed with error Error: The process '/home/runner/.asdf/bin/asdf' failed with exit code 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions