-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Only add explicit -mod=vendor if needed #2332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
-mod=vendor is not needed if it's already set in GOFLAGS. So lets not set it unless it's needed. This is an issue for commands such as `go test` and `go vet` ( see: golang/go#32471 ). This avois such an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one requires your look/check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two additions then lgtm. @JAORMX thanks for submitting this.
This takes into us the suggestions from @estroz and adds the relevant comments for the addition of the -mod=vendor GOFLAG Co-Authored-By: Eric Stroczynski <[email protected]>
@estroz thanks for the suggestions! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Description of the change:
-mod=vendor is not needed if it's already set in GOFLAGS. So let's not
set it unless it's needed.
This is an issue for commands such as
go test
andgo vet
(see golang/go#32471 ). This avoids such an
issue.
Motivation for the change:
With the enforcement of
GOFLAGS=-mod=vendor
in openshift, some projects got broken given that environment variable being set by default and operator-sdk setting that explicitly if the vendor directory exists..