mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-22 14:57:01 +00:00
Merge pull request #1225 from keleustes/fix/compiler
Fixed unit test failures when GOROOT was unset
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -89,7 +90,7 @@ func (b *Compiler) SrcRoot() string {
|
||||
}
|
||||
|
||||
func goBin() string {
|
||||
return filepath.Join(os.Getenv("GOROOT"), "bin", "go")
|
||||
return filepath.Join(runtime.GOROOT(), "bin", "go")
|
||||
}
|
||||
|
||||
// Compile reads ${srcRoot}/${g}/${v}/${k}.go
|
||||
|
||||
Reference in New Issue
Block a user