Messaging both succeed and failure about the signing
It would be good to add a clearer failure or succeed message. Signed-off-by: Hu Keping <hukeping@huawei.com>
This commit is contained in:
parent
5dddf7e98e
commit
1a68662736
1 changed files with 5 additions and 1 deletions
|
@ -438,7 +438,11 @@ func (cli *DockerCli) trustedPush(repoInfo *registry.RepositoryInfo, tag string,
|
|||
}
|
||||
|
||||
err = repo.Publish()
|
||||
if _, ok := err.(client.ErrRepoNotInitialized); !ok {
|
||||
if err == nil {
|
||||
fmt.Fprintf(cli.out, "Successfully signed %q:%s\n", repoInfo.FullName(), tag)
|
||||
return nil
|
||||
} else if _, ok := err.(client.ErrRepoNotInitialized); !ok {
|
||||
fmt.Fprintf(cli.out, "Failed to sign %q:%s - %s\n", repoInfo.FullName(), tag, err.Error())
|
||||
return notaryError(repoInfo.FullName(), err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue