def Kube.rebase.path
import bend-kube-runtime@0.2.0.0/src/config.bend as Configimport Base
import bend-kube-runtime@0.2.0.0/src/json.bend as J
313# A relative path in a kubeconfig is relative to the kubeconfig's directory.
314def Kube.rebase.path(+dir: String, p: J.Json) -> J.Json:
315 match p:
316 case J.JStr{+s}:
317 J.JStr{Kube.rebase.str(dir, s, String.starts_with(s, "/"))}
318 case x:
319 x