This repository was archived by the owner on Jan 5, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -393,16 +393,17 @@ func main() {
393
393
tryBuild ("build" , "./build" ) ||
394
394
tryBuild ("build.sh" , "./build.sh" )
395
395
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." )
404
403
}
404
+ }
405
405
406
+ if ! buildSucceeded {
406
407
if modMode == ModVendor {
407
408
log .Printf ("Skipping dependency installation because a Go vendor directory was found." )
408
409
} else {
You can’t perform that action at this time.
0 commit comments