@@ -293,12 +293,14 @@ func main() {
293
293
log .Println ("Found glide.yaml, enabling go modules" )
294
294
}
295
295
296
- // if a vendor/modules.txt file exists, we assume that there are vendored Go dependencies, and
297
- // skip the dependency installation step and run the extractor with `-mod=vendor`
298
- if util .FileExists ("vendor/modules.txt" ) {
299
- modMode = ModVendor
300
- } else if util .DirExists ("vendor" ) {
301
- modMode = ModMod
296
+ if depMode == GoGetWithModules {
297
+ // if a vendor/modules.txt file exists, we assume that there are vendored Go dependencies, and
298
+ // skip the dependency installation step and run the extractor with `-mod=vendor`
299
+ if util .FileExists ("vendor/modules.txt" ) {
300
+ modMode = ModVendor
301
+ } else if util .DirExists ("vendor" ) {
302
+ modMode = ModMod
303
+ }
302
304
}
303
305
304
306
if modMode == ModVendor {
@@ -453,8 +455,15 @@ func main() {
453
455
// try to build the project
454
456
buildSucceeded := autobuilder .Autobuild ()
455
457
458
+ // Build failed or there are still dependency errors; we'll try to install dependencies
459
+ // ourselves
456
460
if ! buildSucceeded {
457
- // Build failed; we'll try to install dependencies ourselves
461
+ log .Println ("Build failed, continuing to install dependencies." )
462
+
463
+ shouldInstallDependencies = true
464
+ } else if util .DepErrors ("./..." , modMode .argsForGoVersion (getEnvGoSemVer ())... ) {
465
+ log .Println ("Dependencies are still not resolving after the build, continuing to install dependencies." )
466
+
458
467
shouldInstallDependencies = true
459
468
}
460
469
} else {
0 commit comments