Skip to content

Commit

Permalink
Adding GOOS and GOARCH to buildProject
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Sep 19, 2023
1 parent a4ef92c commit a90a80c
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,16 @@ internal class Project {

val topLevel = File(modulePath)

var proc =
ProcessBuilder("go", "list", "all")
val pb =
ProcessBuilder("go", "list", tags.joinToString(",", "-tags="), "all")
.directory(topLevel)
.redirectOutput(ProcessBuilder.Redirect.PIPE)
.start()

val env = pb.environment()
env["GOOS"] = goos
env["GOARCH"] = goarch

var proc = pb.start()
proc.waitFor(5, TimeUnit.MINUTES)
if (proc.exitValue() != 0) {
log.debug(proc.errorStream.bufferedReader().readLine())
Expand Down

0 comments on commit a90a80c

Please sign in to comment.