Private modules can be fetched with go list
Closed this issue ยท 3 comments
Crocmagnon commented
What happens
$ go-libyear --go-list ./go.mod
Error: private module path: 'example.com/module' cannot be handled by any supported VCS [git]
where example.com/module
is an internal module, on a domain configured in GOPRIVATE
.
Expected behavior
When commenting this block:
Lines 108 to 115 in 5dc2dd4
I'm getting the behavior I'd expect:
$ go-libyear --go-list ./go.mod
# ... (prints proper report)
Notes
- It looks like
go-libyear
tries to detect whether it can fetch the repo with git without even checking if it's running withgo-list
. - I don't know whether all private repos can be accessed with
go list
.
nieomylnieja commented
Yeah, this is a clear oversight on my part and a correct identification of the the issue :)
I'll fix it today. Thanks!
nieomylnieja commented
The issue should be fixed in https://github.com/nieomylnieja/go-libyear/releases/tag/v0.4.2.
Let me know if it works for you now :)
Crocmagnon commented
It does! Thanks ๐