This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -393,16 +393,17 @@ func main() {
393393 tryBuild ("build" , "./build" ) ||
394394 tryBuild ("build.sh" , "./build.sh" )
395395
396- if ! buildSucceeded {
397- if modMode == ModVendor {
398- // test if running `go` with -mod=vendor works, and if it doesn't, try to fallback to -mod=mod
399- // or not set if the go version < 1.14.
400- if ! checkVendor () {
401- modMode = modModIfSupported ()
402- log .Println ("The vendor directory is not consistent with the go.mod; not using vendored dependencies." )
403- }
396+ if modMode == ModVendor {
397+ // test if running `go` with -mod=vendor works, and if it doesn't, try to fallback to -mod=mod
398+ // or not set if the go version < 1.14. Note we check this post-build in case the build brings
399+ // the vendor directory up to date.
400+ if ! checkVendor () {
401+ modMode = modModIfSupported ()
402+ log .Println ("The vendor directory is not consistent with the go.mod; not using vendored dependencies." )
404403 }
404+ }
405405
406+ if ! buildSucceeded {
406407 if modMode == ModVendor {
407408 log .Printf ("Skipping dependency installation because a Go vendor directory was found." )
408409 } else {
You can’t perform that action at this time.
0 commit comments