mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 01:46:23 +00:00
add support for exec plugins
This commit is contained in:
@@ -17,7 +17,9 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"sigs.k8s.io/kustomize/k8sdeps/kv/plugin"
|
||||
@@ -51,6 +53,15 @@ func DefaultSrcRoot() (string, error) {
|
||||
}
|
||||
nope = append(nope, root)
|
||||
|
||||
// get the root kustomize source directory when
|
||||
// GOPATH is not set
|
||||
_, filename, _, _ := runtime.Caller(1)
|
||||
root = path.Join(path.Dir(filename), "../..", plugin.PluginRoot)
|
||||
if FileExists(root) {
|
||||
return root, nil
|
||||
}
|
||||
nope = append(nope, root)
|
||||
|
||||
root = filepath.Join(
|
||||
pgmconfig.ConfigRoot(), plugin.PluginRoot)
|
||||
if FileExists(root) {
|
||||
|
||||
Reference in New Issue
Block a user