mirror of https://github.com/docker/compose.git
Merge pull request #1953 from amineck/no_pass
Post-login msg: Ignore if password is empty
This commit is contained in:
commit
f09336e519
cli/mobycli
|
@ -65,6 +65,9 @@ func isUsingDefaultRegistry(cmdArgs []string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isUsingPassword(pass string) bool {
|
func isUsingPassword(pass string) bool {
|
||||||
|
if pass == "" { // ignore if no password (or SSO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
if _, err := uuid.ParseUUID(pass); err == nil {
|
if _, err := uuid.ParseUUID(pass); err == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,11 @@ func TestIsUsingPassword(t *testing.T) {
|
||||||
"mypass",
|
"mypass",
|
||||||
true,
|
true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"no password or sso",
|
||||||
|
"",
|
||||||
|
false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"personal access token",
|
"personal access token",
|
||||||
"1508b8bd-b80c-452d-9a7a-ee5607c41bcd",
|
"1508b8bd-b80c-452d-9a7a-ee5607c41bcd",
|
||||||
|
|
Loading…
Reference in New Issue