fix(mkreleaselog): make robust against running in different working directories#7310
fix(mkreleaselog): make robust against running in different working directories#7310
Conversation
…irectories 1. Cd into the repo root before running `go list`. 2. Make sure the repo lives in the GOPATH.
There was a problem hiding this comment.
This works too... though... it requires knowing what GOPATH is. Note that I was using "default GOPATH", when I wrote the patch/did the testing. I assume this is the case for most newcomers to go, post-modules, thus the "just go get it" worked for me:
admin:~/devel/go-ipfs$ env | grep GO
[@ Wed 06:00:36.432]
[$?==1 / 0.010s]
admin:~/devel/go-ipfs$ go env | grep PATH
GOPATH="/Users/admin/go"
[@ Wed 06:00:42.708]
[$?==0 / 0.127s]
|
https://github.com/ipfs/go-ipfs/blob/8e7cead9af8fc0d8886e7b601275e6061a526dd6/bin/mkreleaselog#L5 ( |
|
@Stebalien I misphrased. What I meant is that the user needs to know what GOPATH is, and most newcomers to go post-modules do not really understand all that (I still don't... fully). Thus this is a bit cryptic: Ok, it requires this, how do I fix it? :) In any case: this is maint tooling, not that important, just wanted to clarify what I meant. |
|
Ah, got it. Yeah, I'm tempted to say "if you're messing with this script, you probably know what GOPATH is". |
go list.fixes #7296 (comment)