Support user-name containing white-spaces in docker commands
@@ -199,7 +199,7 @@ type LoginCmd struct {
}
func (loginCmd *LoginCmd) GetCmd() *exec.Cmd {
- cmdLogin := "| docker login " + loginCmd.DockerRegistry + " --username=" + loginCmd.Username + " --password-stdin"
+ cmdLogin := fmt.Sprintf(`| docker login %s --username="%s" --password-stdin`, loginCmd.DockerRegistry, loginCmd.Username)
if cliutils.IsWindows() {
cmd := "echo %DOCKER_PASS%" + cmdLogin
