@@ -401,7 +401,7 @@ func getModMode(depMode DependencyInstallerMode, baseDir string) ModMode {
401
401
}
402
402
403
403
// fixGoVendorIssues fixes issues with go vendor for go version >= 1.14
404
- func fixGoVendorIssues (buildInfo BuildInfo , goModVersionFound bool ) ModMode {
404
+ func fixGoVendorIssues (buildInfo * BuildInfo , goModVersionFound bool ) {
405
405
if buildInfo .ModMode == ModVendor {
406
406
// fix go vendor issues with go versions >= 1.14 when no go version is specified in the go.mod
407
407
// if this is the case, and dependencies were vendored with an old go version (and therefore
@@ -421,13 +421,12 @@ func fixGoVendorIssues(buildInfo BuildInfo, goModVersionFound bool) ModMode {
421
421
log .Println ("Adding a version directive to the go.mod file as the modules.txt does not have explicit annotations" )
422
422
if ! addVersionToMod ("1.13" ) {
423
423
log .Println ("Failed to add a version to the go.mod file to fix explicitly required package bug; not using vendored dependencies" )
424
- return ModMod
424
+ buildInfo . ModMode = ModMod
425
425
}
426
426
}
427
427
}
428
428
}
429
429
}
430
- return buildInfo .ModMode
431
430
}
432
431
433
432
// Determines whether the project needs a GOPATH set up
@@ -778,7 +777,7 @@ func installDependenciesAndBuild() {
778
777
diagnostics .EmitNewerGoVersionNeeded ()
779
778
}
780
779
781
- buildInfo . ModMode = fixGoVendorIssues (buildInfo , goModVersionFound )
780
+ fixGoVendorIssues (& buildInfo , goModVersionFound )
782
781
783
782
tryUpdateGoModAndGoSum (buildInfo )
784
783
0 commit comments