diff --git a/cmd/tk/init.go b/cmd/tk/init.go index e9c0556a1..2f87aa6fd 100644 --- a/cmd/tk/init.go +++ b/cmd/tk/init.go @@ -71,7 +71,12 @@ func initCmd() *cli.Command { } func installK8sLib() error { - if _, err := exec.LookPath("jb"); err != nil { + jbBinary := "jb" + if env := os.Getenv("TANKA_JB_PATH"); env != "" { + jbBinary = env + } + + if _, err := exec.LookPath(jbBinary); err != nil { return errors.New("jsonnet-bundler not found in $PATH. Follow https://tanka.dev/install#jsonnet-bundler for installation instructions") } diff --git a/docs/docs/env-vars.md b/docs/docs/env-vars.md index d145f8d19..3ac22931a 100644 --- a/docs/docs/env-vars.md +++ b/docs/docs/env-vars.md @@ -5,6 +5,11 @@ route: "/env-vars" # Environment Variables +### TANKA_JB_PATH + +**Description**: Path to the `jb` tool executable +**Default**: `$PATH/jb` + ### TANKA_KUBECTL_PATH **Description**: Path to the `kubectl` tool executable