Skip to content

Commit

Permalink
err for lookpath
Browse files Browse the repository at this point in the history
Signed-off-by: Emily McMullan <[email protected]>
  • Loading branch information
eemcmullan committed Nov 10, 2023
1 parent 698dfaf commit 65ce693
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ type Config struct {
func (c *Config) Load() error {
envValue := os.Getenv("PODMAN_BIN")
if envValue == "" {
podmanPath, _ := exec.LookPath("podman")
podmanPath, err := exec.LookPath("podman")
if err != nil {
return err
}
if podmanPath != c.PodmanBinary && (podmanPath != "" || len(podmanPath) > 0) {
os.Setenv("PODMAN_BIN", podmanPath)
}
Expand Down

0 comments on commit 65ce693

Please sign in to comment.