summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-14 21:53:47 +0200
committerGitHub <noreply@github.com>2020-07-14 21:53:47 +0200
commit50cd21e1811f4fe508a74dc316c81a047de4e8d9 (patch)
tree79c87a1f6d0ed244a0a29a3a98e5b326d10cd3f4 /pkg
parentc078e936bf5793433359c43498a89943ded3f8fc (diff)
parent6535c8b9e82a1cc1f5c8d03215b9de5851b2010c (diff)
downloadpodman-50cd21e1811f4fe508a74dc316c81a047de4e8d9.tar.gz
podman-50cd21e1811f4fe508a74dc316c81a047de4e8d9.tar.bz2
podman-50cd21e1811f4fe508a74dc316c81a047de4e8d9.zip
Merge pull request #6939 from rhatdan/entrypoint
Fix handling of entrypoint
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers_create.go2
-rw-r--r--pkg/specgen/generate/oci.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go
index 031e30b7e..cbee8a8b6 100644
--- a/pkg/api/handlers/compat/containers_create.go
+++ b/pkg/api/handlers/compat/containers_create.go
@@ -81,7 +81,7 @@ func makeCreateConfig(ctx context.Context, containerConfig *config.Config, input
workDir = input.WorkingDir
}
- if len(input.Entrypoint) == 0 {
+ if input.Entrypoint == nil {
entrypointSlice, err := newImage.Entrypoint(ctx)
if err != nil {
return createconfig.CreateConfig{}, err
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index d7818c062..140dc5092 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -87,7 +87,7 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image
finalCommand := []string{}
entrypoint := s.Entrypoint
- if len(entrypoint) == 0 && img != nil {
+ if entrypoint == nil && img != nil {
newEntry, err := img.Entrypoint(ctx)
if err != nil {
return nil, err