Skip to content
Snippets Groups Projects
Commit 1e8ea9e1 authored by Angus Lees's avatar Angus Lees
Browse files

Add jsonnet search path from KUBECFG_JPATH env var too

parent 4ab98f60
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ package cmd
import (
goflag "flag"
"fmt"
"os"
"path/filepath"
"github.com/golang/glog"
......@@ -38,6 +39,12 @@ func JsonnetVM(cmd *cobra.Command) (*jsonnet.VM, error) {
vm := jsonnet.Make()
flags := cmd.Flags()
jpath := os.Getenv("KUBECFG_JPATH")
for _, p := range filepath.SplitList(jpath) {
glog.V(2).Infoln("Adding jsonnet search path", p)
vm.JpathAdd(p)
}
jpath, err := flags.GetString("jpath")
if err != nil {
return nil, err
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment