summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-17 09:55:32 -0500
committerGitHub <noreply@github.com>2021-02-17 09:55:32 -0500
commit2e522ff29cfea06a37debfc4a31a231bf7097b34 (patch)
tree14dcb028e71b9a33ba84944bfa842badc552f68a /pkg
parentaa7c7bde7918ee830551299c0bf2196ec00b18ec (diff)
parent12a577aea55bc5967913da6306d819065c0cfb76 (diff)
downloadpodman-2e522ff29cfea06a37debfc4a31a231bf7097b34.tar.gz
podman-2e522ff29cfea06a37debfc4a31a231bf7097b34.tar.bz2
podman-2e522ff29cfea06a37debfc4a31a231bf7097b34.zip
Merge pull request #9404 from rhatdan/entrypoint
Ignore entrypoint=[""]
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgen/generate/oci.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index 1a0ec08a5..eefe45dfe 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -105,7 +105,10 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image
entrypoint = newEntry
}
- finalCommand = append(finalCommand, entrypoint...)
+ // Don't append the entrypoint if it is [""]
+ if len(entrypoint) != 1 || entrypoint[0] != "" {
+ finalCommand = append(finalCommand, entrypoint...)
+ }
// Only use image command if the user did not manually set an
// entrypoint.