From 5f347612d970b732a2bbfede89b15163ecda5e0b Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 4 Sep 2015 13:01:18 -0700 Subject: [PATCH] removed a stupid debug line --- main.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 9476954..0782478 100644 --- a/main.go +++ b/main.go @@ -35,6 +35,13 @@ func main() { plugin.Param("vargs", &vargs) plugin.MustParse() + // in case someone uses the shorthand repository name + // with a custom registry, we should concatinate so that + // we have the fully qualified image name. + if strings.Count(vargs.Repo, "/") == 1 && len(vargs.Registry) != 0 { + vargs.Repo = fmt.Sprintf("%s/%s", vargs.Registry, vargs.Repo) + } + // Set the Registry value if len(vargs.Registry) == 0 { vargs.Registry = "https://index.docker.io/v1/" @@ -95,6 +102,7 @@ func main() { cmd.Stderr = os.Stderr err := cmd.Run() if err != nil { + fmt.Println("Login failed.") os.Exit(1) } } else { @@ -124,10 +132,6 @@ func main() { os.Exit(1) } - if true { - return - } - // Push the container cmd = exec.Command("/usr/bin/docker", "push", vargs.Repo) cmd.Dir = workspace.Path