When using a replace directive in go.mod to point to a repo-local directory, like ./third_party/, go-licenses check ./vendor/... errors.
Example error:
F0131 19:17:31.165207 3484068 main.go:75] licenses.Find: rootDir /home/<me>/workspace/kpt-config-sync/internal/third_party/github.com/GoogleContainerTools/kpt should contain dir /home/<me>/workspace/kpt-config-sync/vendor/github.com/GoogleContainerTools/kpt/internal/types
The replace directive used:
replace github.com/GoogleContainerTools/kpt => ./internal/third_party/github.com/GoogleContainerTools/kpt
It's unclear exactly why it errors, but it seems to be validating that the file is in the correct file path according to the package path. But with a replace directive, there are two copies of this dependency, one in ./vendor/github.com/GoogleContainerTools/kpt, vendored from ./internal/third_party/github.com/GoogleContainerTools/kpt.
When using a replace directive in go.mod to point to a repo-local directory, like
./third_party/,go-licenses check ./vendor/...errors.Example error:
The replace directive used:
It's unclear exactly why it errors, but it seems to be validating that the file is in the correct file path according to the package path. But with a replace directive, there are two copies of this dependency, one in
./vendor/github.com/GoogleContainerTools/kpt, vendored from./internal/third_party/github.com/GoogleContainerTools/kpt.