mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 18:10:59 +00:00
Simplify plugin loader code.
* use one place to build plugin file names, * use one loader instance, * test for plugin enabled flag in just one place to avoid errors and reduce if statements, * don't return private objects, * factor goplugin loading to a method, * fix a related test that was commented out.
This commit is contained in:
@@ -62,8 +62,7 @@ func DefaultSrcRoot() (string, error) {
|
||||
}
|
||||
nope = append(nope, root)
|
||||
|
||||
root = filepath.Join(
|
||||
pgmconfig.ConfigRoot(), plugin.PluginRoot)
|
||||
root = plugin.DefaultPluginConfig().DirectoryPath
|
||||
if FileExists(root) {
|
||||
return root, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user