Skip to content

Commit

Permalink
traverse: fix GoBinDir
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Nov 9, 2024
1 parent 45ee47a commit 9c10a32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/traverse/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import (

// GoBinDir TODO experimental
func GoBinDir(tc Context) (dir string, err error) {
if path, ok := tc.LookupEnv("GOBIN"); ok {
return filepath.ToSlash(path), nil
}

if path, ok := tc.LookupEnv("GOPATH"); ok {
dir = strings.Split(path, string(os.PathListSeparator))[0]
}
Expand Down

0 comments on commit 9c10a32

Please sign in to comment.