Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.22.4 cannot find GOROOT directory: 'go' binary is trimmed and GOROOT is not set #68107

Closed
garry-t opened this issue Jun 21, 2024 · 2 comments
Closed

Comments

@garry-t
Copy link

garry-t commented Jun 21, 2024

Go version

1.22.4

Output of go env in your module/workspace:

I cant check it.

What did you do?

I use ansible scripts and everything worked until 1.22.4 released. I run installation script today for fresh machine.

- name: Check the latest available Go version
  ansible.builtin.shell: |
    set -o pipefail;
    curl -s https://go.dev/VERSION?m=text | grep 'go' | tr -d 'go'
  args:
    executable: /bin/bash
  changed_when: false
  register: wal_g_latest_version

- name: "Download Go v{{ wal_g_latest_version.stdout }}"
    ansible.builtin.get_url:
      url: "https://go.dev/dl/go{{ wal_g_latest_version.stdout }}.linux-amd64.tar.gz"
      dest: /tmp/
      timeout: 60
      validate_certs: false

- name: Install Go
    ansible.builtin.unarchive:
      src: "/tmp/go{{ wal_g_latest_version.stdout }}.linux-amd64.tar.gz"
      dest: /usr/local/
      extra_opts:
        - --no-same-owner
      remote_src: true
    when: go_installed_version.stderr is search("command not found") or
      go_installed_version.stdout is version(wal_g_latest_version.stdout, '<')
echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/go/bin

What did you see happen?

Run: go env
go: cannot find GOROOT directory: 'go' binary is trimmed and GOROOT is not set.

it is disaster with this environment variables. What I need to set to make it work?

What did you expect to see?

it just works

@seankhliao
Copy link
Member

looks like third party tooling issue.

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants