Skip to content

Commit

Permalink
fix integration test (#1181)
Browse files Browse the repository at this point in the history
* fix integration test

* review comments
  • Loading branch information
ashmeenkaur committed Jun 23, 2023
1 parent ce0a93d commit 4d4f9fe
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tools/build_gcsfuse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import (
"os/exec"
"path"
"runtime"
"strings"
)

// Build release binaries according to the supplied settings, setting up the
Expand Down Expand Up @@ -133,10 +134,10 @@ func buildBinaries(dstDir, srcDir, version string, buildArgs []string) (err erro
cmd := exec.Command(
"go",
"build",
"-o",
path.Join(dstDir, bin.outputPath),
"-C",
srcDir)
srcDir,
"-o",
path.Join(dstDir, bin.outputPath))

if path.Base(bin.outputPath) == "gcsfuse" {
cmd.Args = append(
Expand Down Expand Up @@ -164,6 +165,9 @@ func buildBinaries(dstDir, srcDir, version string, buildArgs []string) (err erro
output, err = cmd.CombinedOutput()
if err != nil {
err = fmt.Errorf("%v: %w\nOutput:\n%s", cmd, err, output)
if strings.Contains(string(output), "flag provided but not defined: -C") {
err = fmt.Errorf("%v: %w\nOutput:\n%s\nPlease upgrade to go version 1.20 or higher", cmd, err, output)
}
return
}
}
Expand Down

0 comments on commit 4d4f9fe

Please sign in to comment.