shurcooL / Go-Package-Store

An app that displays updates for the Go packages in your GOPATH.
MIT License
900 stars 29 forks source link

GO_PACKAGE_STORE_GITHUB_TOKEN doesn't work with Win7 #57

Closed klauern closed 8 years ago

klauern commented 8 years ago

It mentioned that you could use the environment variable GO_PACKAGE_STORE_GITHUB_TOKEN to authenticate your calls. However, that doesn't work in Windows.

I think this is related to this error:

2016/03/08 07:53:08 skipping persistent on-disk caching, because unable to acquire a cache dir: ospath.CacheDir not implemented for windows/amd64
Using all Go packages in GOPATH.
Go Package Store server is running at http://localhost:7043/index.html.

Does this environment variable require CacheDir to work?

dmitshur commented 8 years ago

Yeah, you're absolutely right, the GO_PACKAGE_STORE_GITHUB_TOKEN env var only works together with CacheDir, and that was an oversight and unintended!

It's because it checks that env var inside the block when CacheDir is supported:

https://github.com/shurcooL/Go-Package-Store/blob/7516406a51a34138ec20c6bf632fb479509da62c/main.go#L238-L243

Thanks for reporting this problem @klauern, I will fix it tonight! GO_PACKAGE_STORE_GITHUB_TOKEN will be supported independently of CacheDir.

klauern commented 8 years ago

That's great news. I took a look at it and wasn't sure if it was a big change or not.

klauern commented 8 years ago

This is excellent. Thank you for such a quick turnaround. Things seem to be working great on my end.