Skip to content

Commit

Permalink
remove gopath processing in local builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nikogura committed Jan 13, 2023
1 parent 5e09fe7 commit 421e4f5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/gomason/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 271,12 @@ func (g Golang) Build(gopath string, meta Metadata, skipTargets string, local bo
// This gets weird because go's exec shell doesn't like the arg format that gox expects
// Building it thusly keeps the various quoting levels straight

gopathenv := fmt.Sprintf("GOPATH=%s", gopath)
runenv := append(os.Environ(), gopathenv)
runenv := make([]string, 0)

if !local {
gopathenv := fmt.Sprintf("GOPATH=%s", gopath)
runenv = append(os.Environ(), gopathenv)
}

// allow user to turn off go modules
if !target.Legacy {
Expand Down

0 comments on commit 421e4f5

Please sign in to comment.