From 7c01aebdc98848f27ddca85f7a81f220f2e1321f Mon Sep 17 00:00:00 2001 From: Mark van Holsteijn Date: Tue, 9 Nov 2021 20:51:43 +0100 Subject: [PATCH] fix: avoid log message if git is not found on path --- clone.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clone.go b/clone.go index 7b0e1e9..dd84c9c 100644 --- a/clone.go +++ b/clone.go @@ -27,7 +27,7 @@ import ( func getCredentialHelper(url *neturl.URL) string { git, err := exec.LookPath("git") if err != nil { - if err != exec.ErrNotFound { + if lookupError, ok := err.(*exec.Error); !ok || lookupError.Err != exec.ErrNotFound { log.Printf("ERROR: failed to lookup git on path, %s", err) } return ""