From 47725d04454d73ad57821ad423791170575747af Mon Sep 17 00:00:00 2001 From: risk danger olson Date: Tue, 17 Nov 2015 18:29:55 -0700 Subject: [PATCH] don't return any empty creds --- lfs/credentials.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lfs/credentials.go b/lfs/credentials.go index 0da12191..65a98032 100644 --- a/lfs/credentials.go +++ b/lfs/credentials.go @@ -181,7 +181,7 @@ func execCredsCommand(input Creds, subCommand string) (Creds, error) { // 'git credential' exits with 128 if the helper doesn't fill the username // and password values. if subCommand == "fill" && err.Error() == "exit status 128" { - return input, nil + return nil, nil } } @@ -192,7 +192,7 @@ func execCredsCommand(input Creds, subCommand string) (Creds, error) { creds := make(Creds) for _, line := range strings.Split(output.String(), "\n") { pieces := strings.SplitN(line, "=", 2) - if len(pieces) < 2 { + if len(pieces) < 2 || len(pieces[1]) < 1 { continue } creds[pieces[0]] = pieces[1]