mirror of
https://github.com/google/go-jsonnet.git
synced 2025-09-29 09:21:03 +02:00
Add JSONNET_PATH (go version)
This commit is contained in:
parent
83abda5985
commit
3481c9c698
@ -22,6 +22,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
|
"path/filepath"
|
||||||
"runtime/pprof"
|
"runtime/pprof"
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
@ -506,6 +507,11 @@ func main() {
|
|||||||
vm.ErrorFormatter.SetColorFormatter(color.New(color.FgRed).Fprintf)
|
vm.ErrorFormatter.SetColorFormatter(color.New(color.FgRed).Fprintf)
|
||||||
|
|
||||||
config := makeConfig()
|
config := makeConfig()
|
||||||
|
jsonnetPath := filepath.SplitList(os.Getenv("JSONNET_PATH"))
|
||||||
|
for i := len(jsonnetPath) - 1; i >= 0; i-- {
|
||||||
|
config.evalJpath = append(config.evalJpath, jsonnetPath[i])
|
||||||
|
}
|
||||||
|
|
||||||
status, err := processArgs(os.Args[1:], &config, vm)
|
status, err := processArgs(os.Args[1:], &config, vm)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, err.Error())
|
fmt.Fprintln(os.Stderr, err.Error())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user