1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fix commit and import when no repository is specified

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
Michael Crosby 2014-03-27 04:24:31 +00:00
parent 45b43d85ec
commit 097aef2ca9

View file

@ -1013,9 +1013,11 @@ func (cli *DockerCli) CmdImport(args ...string) error {
}
v := url.Values{}
//Check if the given image name can be resolved
if _, _, err := registry.ResolveRepositoryName(repository); err != nil {
return err
if repository != "" {
//Check if the given image name can be resolved
if _, _, err := registry.ResolveRepositoryName(repository); err != nil {
return err
}
}
v.Set("repo", repository)
@ -1469,8 +1471,10 @@ func (cli *DockerCli) CmdCommit(args ...string) error {
}
//Check if the given image name can be resolved
if _, _, err := registry.ResolveRepositoryName(repository); err != nil {
return err
if repository != "" {
if _, _, err := registry.ResolveRepositoryName(repository); err != nil {
return err
}
}
v := url.Values{}