summaryrefslogtreecommitdiff
path: root/pkg/specgen
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-21 06:35:51 -0400
committerGitHub <noreply@github.com>2020-10-21 06:35:51 -0400
commitd5073af6b24239fc94bc6bb184f9df6a979887c6 (patch)
treec099add9f347d078535574941db376d6b4a6aff7 /pkg/specgen
parent94873a237ab52db27916b8954e489fe780eea069 (diff)
parenteb91d66c4aa0d2d75a5787ab7013cef88d8c9f4f (diff)
downloadpodman-d5073af6b24239fc94bc6bb184f9df6a979887c6.tar.gz
podman-d5073af6b24239fc94bc6bb184f9df6a979887c6.tar.bz2
podman-d5073af6b24239fc94bc6bb184f9df6a979887c6.zip
Merge pull request #8022 from baude/compatapitospecgen
refactor api compatibility container creation to specgen
Diffstat (limited to 'pkg/specgen')
-rw-r--r--pkg/specgen/generate/oci.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index f02432f5b..8454458a8 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -110,7 +110,7 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image
// Only use image command if the user did not manually set an
// entrypoint.
command := s.Command
- if command == nil && img != nil && s.Entrypoint == nil {
+ if (command == nil || len(command) == 0) && img != nil && (s.Entrypoint == nil || len(s.Entrypoint) == 0) {
newCmd, err := img.Cmd(ctx)
if err != nil {
return nil, err