asdf-community / asdf-golang

Go plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
549 stars 92 forks source link

Make exec-env strict-mode compliant #72

Closed beni0888 closed 2 years ago

beni0888 commented 2 years ago

This file is not strict-mode compliant and because of that, if you execute it from a script in strict mode, it will throw an error like follows:

WARN Failed to discover go env: failed to run 'go env': exit status 1
ERRO Running error: context loading failed: failed to load packages: failed to load with go/packages: err: exit status 1: stderr: /Users/myuser/.asdf/plugins/golang/bin/exec-env: line 4: GOROOT: unbound variable
kennyp commented 2 years ago

Thanks @beni0888! Very nice.