Skip to content

Commit 6c0c336

Browse files
committed
Go: Fix vendor issues and go.sum files in separate loop
1 parent d344f72 commit 6c0c336

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

go/extractor/cli/go-autobuilder/go-autobuilder.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,14 +553,17 @@ func installDependenciesAndBuild() {
553553
// Track all projects which could not be extracted successfully
554554
var unsuccessfulProjects = []string{}
555555

556-
// Attempt to extract all workspaces; we will tolerate individual extraction failures here
557-
for i, workspace := range workspaces {
556+
// Attempt to automatically fix issues with each workspace
557+
for _, workspace := range workspaces {
558558
goVersionInfo := workspace.RequiredGoVersion()
559559

560560
fixGoVendorIssues(&workspace, goVersionInfo != nil)
561561

562562
tryUpdateGoModAndGoSum(workspace)
563+
}
563564

565+
// Attempt to extract all workspaces; we will tolerate individual extraction failures here
566+
for i, workspace := range workspaces {
564567
// check whether an explicit dependency installation command was provided
565568
inst := util.Getenv("CODEQL_EXTRACTOR_GO_BUILD_COMMAND", "LGTM_INDEX_BUILD_COMMAND")
566569
shouldInstallDependencies := false

0 commit comments

Comments
 (0)