mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Fixed unit test failures when GOROOT was unset
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -89,7 +90,7 @@ func (b *Compiler) SrcRoot() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func goBin() 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
|
// Compile reads ${srcRoot}/${g}/${v}/${k}.go
|
||||||
|
|||||||
Reference in New Issue
Block a user