fix: add some simple validation
This commit is contained in:
1 parent
a6e4949264
commit
336e901c1e
1 file changed
+10
@@ -20,6 +20,16 @@ func CommandLogin(server string, username string, password string, passwordStdin
|
|||||||
password = strings.TrimSpace(string(stdin))
|
password = strings.TrimSpace(string(stdin))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if server == "" {
|
||||||
|
return errors.New("Missing server argument")
|
||||||
|
}
|
||||||
|
if username == "" {
|
||||||
|
return errors.New("Missing username argument")
|
||||||
|
}
|
||||||
|
if password == "" {
|
||||||
|
return errors.New("Missing password argument")
|
||||||
|
}
|
||||||
|
|
||||||
command := []string{
|
command := []string{
|
||||||
common.DockerBin(),
|
common.DockerBin(),
|
||||||
"login",
|
"login",
|
||||||
|
|||||||
Reference in new issue
Block a user