diff --git a/cmd/settings.go b/cmd/settings.go index 34c9c70..6575085 100644 --- a/cmd/settings.go +++ b/cmd/settings.go @@ -26,10 +26,14 @@ type Config struct { } func (c *Config) Load() error { - podmanPath, _ := exec.LookPath("podman") - if podmanPath != c.PodmanBinary && (podmanPath != "" || len(podmanPath) > 0) { - os.Setenv("PODMAN_BIN", podmanPath) + envValue := os.Getenv("PODMAN_BIN") + if envValue == "" { + podmanPath, _ := exec.LookPath("podman") + if podmanPath != c.PodmanBinary && (podmanPath != "" || len(podmanPath) > 0) { + os.Setenv("PODMAN_BIN", podmanPath) + } } + err := env.Set(c) if err != nil { return err