Skip to content

Commit 303257d

Browse files
committed
jb binary env var fix
1 parent 6941b87 commit 303257d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

cmd/tk/init.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ func initCmd() *cli.Command {
7171
}
7272

7373
func installK8sLib() error {
74-
if _, err := exec.LookPath("jb"); err != nil {
74+
jbBinary := "jb"
75+
if env := os.Getenv("TANKA_JB_PATH"); env != "" {
76+
jbBinary = env
77+
}
78+
79+
if _, err := exec.LookPath(jbBinary); err != nil {
7580
return errors.New("jsonnet-bundler not found in $PATH. Follow https://tanka.dev/install#jsonnet-bundler for installation instructions")
7681
}
7782

docs/docs/env-vars.md

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ route: "/env-vars"
1010
**Description**: Path to the `kubectl` tool executable
1111
**Default**: `$PATH/kubectl`
1212

13+
### TANKA_JB_PATH
14+
15+
**Description**: Path to the `jb` tool executable
16+
**Default**: `$PATH/jb`
17+
1318
### TANKA_KUBECTL_TRACE
1419

1520
**Description**: Print all calls to `kubectl`

0 commit comments

Comments
 (0)