From cb5619919a4dad2e03c48b4dcdbdc803e8559d55 Mon Sep 17 00:00:00 2001 From: juan Date: Mon, 28 Mar 2022 13:14:24 +1100 Subject: [PATCH] fix(credentialParser): validate error before parsing password to avoid nil pointer. #418 --- cli/internal/git/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/internal/git/utils.go b/cli/internal/git/utils.go index a2853e36a1..f9b50ed954 100644 --- a/cli/internal/git/utils.go +++ b/cli/internal/git/utils.go @@ -63,10 +63,10 @@ func credentialParser() []Credential { scanner := bufio.NewScanner(credentialsFile) for scanner.Scan() { gitUrl, err := url.Parse(scanner.Text()) - password, _ := gitUrl.User.Password() if err != nil { continue } + password, _ := gitUrl.User.Password() credential := Credential{ Path: gitUrl.Host, Auth: http.BasicAuth{