mirror of
https://github.com/google/go-jsonnet.git
synced 2025-09-29 01:11:02 +02:00
Add JSONNET_PATH (go version)
This commit is contained in:
parent
83abda5985
commit
3481c9c698
@ -22,6 +22,7 @@ import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime/pprof"
|
||||
"sort"
|
||||
"strconv"
|
||||
@ -506,6 +507,11 @@ func main() {
|
||||
vm.ErrorFormatter.SetColorFormatter(color.New(color.FgRed).Fprintf)
|
||||
|
||||
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)
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err.Error())
|
||||
|
Loading…
x
Reference in New Issue
Block a user