diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-03 09:08:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-03 09:08:02 -0400 |
commit | 41358f5ea06062f1e1b80bd29802ea5d51cfe3b1 (patch) | |
tree | 17530f08e51529244e17d7a392fe5ab8f87e2c05 /pkg/api/handlers/libpod | |
parent | bfd34542f463b7ea59b9560516b3b3d66674eefe (diff) | |
parent | 0785d6af157f815b93b2c7b105dbece2dbb7fefa (diff) | |
download | podman-41358f5ea06062f1e1b80bd29802ea5d51cfe3b1.tar.gz podman-41358f5ea06062f1e1b80bd29802ea5d51cfe3b1.tar.bz2 podman-41358f5ea06062f1e1b80bd29802ea5d51cfe3b1.zip |
Merge pull request #7158 from rhatdan/commit
Handle single character images
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r-- | pkg/api/handlers/libpod/images.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkg/api/handlers/libpod/images.go b/pkg/api/handlers/libpod/images.go index e0da990c3..51013acf1 100644 --- a/pkg/api/handlers/libpod/images.go +++ b/pkg/api/handlers/libpod/images.go @@ -594,11 +594,9 @@ func CommitContainer(w http.ResponseWriter, r *http.Request) { return } - // I know mitr hates this ... but doing for now - if len(query.Repo) > 1 { + if len(query.Repo) > 0 { destImage = fmt.Sprintf("%s:%s", query.Repo, tag) } - commitImage, err := ctr.Commit(r.Context(), destImage, options) if err != nil && !strings.Contains(err.Error(), "is not running") { utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrapf(err, "CommitFailure")) |