tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.55k stars 455 forks source link

Godep should use go env for missing ENV variables #551

Closed sylr closed 6 years ago

sylr commented 6 years ago

Expected behavior

If GOROOT is not set godep should use go env

sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ go build
sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ godep save
sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ 

Actual behavior

sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ go build
sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ godep save
godep: Package (crypto/tls) not found
sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ export GOROOT=$(go env GOROOT)
sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ godep save
sylvain@ubuntu-1604-dev:~/gopath/src/github.com/sylr/alertmanager-splunkbot[godep]$ 

Steps to reproduce behavior

unset GOROOT

godep version output

godep v79 (linux/amd64/go1.9)

go version output

go version go1.9.2 linux/amd64

freeformz commented 6 years ago

I am closing this issue because the repo is going to be archived.