Browse Source

Merge pull request #21740 from mindlapse/fixErrorMsg

Improved message when pushing a non-existant image
John Howard 9 years ago
parent
commit
f2ed337ac9
2 changed files with 2 additions and 2 deletions
  1. 1 1
      distribution/push.go
  2. 1 1
      integration-cli/docker_cli_push_test.go

+ 1 - 1
distribution/push.go

@@ -109,7 +109,7 @@ func Push(ctx context.Context, ref reference.Named, imagePushConfig *ImagePushCo
 
 	associations := imagePushConfig.ReferenceStore.ReferencesByName(repoInfo)
 	if len(associations) == 0 {
-		return fmt.Errorf("Repository does not exist: %s", repoInfo.Name())
+		return fmt.Errorf("An image does not exist locally with the tag: %s", repoInfo.Name())
 	}
 
 	var (

+ 1 - 1
integration-cli/docker_cli_push_test.go

@@ -43,7 +43,7 @@ func (s *DockerSuite) TestPushUnprefixedRepo(c *check.C) {
 
 func testPushUntagged(c *check.C) {
 	repoName := fmt.Sprintf("%v/dockercli/busybox", privateRegistryURL)
-	expected := "Repository does not exist"
+	expected := "An image does not exist locally with the tag"
 
 	out, _, err := dockerCmdWithError("push", repoName)
 	c.Assert(err, check.NotNil, check.Commentf("pushing the image to the private registry should have failed: output %q", out))