Skip to content

Commit 4737d40

Browse files
authored
Fix - tests fail after upgrade go version to 1.16 (#464)
1 parent 77f4f05 commit 4737d40

File tree

2 files changed

+2
-2
lines changed
  • build-info-extractor-go/src

2 files changed

+2
-2
lines changed

build-info-extractor-go/src/main/java/org/jfrog/build/extractor/go/extractor/GoRun.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ public Build execute() {
8080
}
8181
// We create the GoDriver here as env might had changed.
8282
this.goDriver = new GoDriver(GO_CLIENT_CMD, env, path.toFile(), logger);
83-
this.moduleName = goDriver.getModuleName();
8483
// First try to run 'go version' to make sure go is in PATH, and write the output to logger.
8584
goDriver.version(true);
8685
goDriver.runCmd(goCmdArgs, true);
86+
this.moduleName = goDriver.getModuleName();
8787
collectDependencies();
8888
return createBuild();
8989
} catch (Exception e) {

build-info-extractor-go/src/test/java/org/jfrog/build/extractor/go/extractor/GoExtractorTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class GoExtractorTest extends IntegrationTestsBase {
3232
private static final String GO_REMOTE_REPO = "build-info-tests-go-remote";
3333
private static final String GO_VIRTUAL_REPO = "build-info-tests-go-virtual";
3434
private static final String[] GO_PACKAGE_EXTENSIONS = {".zip", ".mod", ".info"};
35-
private static final String GO_BUILD_CMD = "build";
35+
private static final String GO_BUILD_CMD = "build -mod=mod";
3636

3737
private static final Path PROJECTS_ROOT = Paths.get(".").toAbsolutePath().normalize().resolve(Paths.get("src", "test", "resources", "org", "jfrog", "build", "extractor"));
3838

0 commit comments

Comments
 (0)