mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Go autobuilder: don't attempt a go mod tidy when there's a vendor directory present
This is likely to spuriously remove dependencies leading to a later build failure due to missing requirements.
This commit is contained in:
@@ -291,7 +291,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Go 1.16 and later won't automatically attempt to update go.mod / go.sum during package loading, so try to update them here:
|
||||
if depMode == GoGetWithModules && semver.Compare(getEnvGoSemVer(), "1.16") >= 0 {
|
||||
if modMode != ModVendor && depMode == GoGetWithModules && semver.Compare(getEnvGoSemVer(), "1.16") >= 0 {
|
||||
// stat go.mod and go.sum
|
||||
beforeGoModFileInfo, beforeGoModErr := os.Stat("go.mod")
|
||||
if beforeGoModErr != nil {
|
||||
|
||||
Reference in New Issue
Block a user