aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-08 16:50:20 +0000
committerGitHub <noreply@github.com>2021-12-08 16:50:20 +0000
commit02eaebda46418d6a69a54a08066080fa24f38ebe (patch)
treeffaf7a573ce525a9f1e7db01e96b38fb165fae91 /pkg
parentd6079debd86861c40f98cf66d6da3208bc5b397a (diff)
parentb526a0ccdc289edaaff4ee1ab9ffab60310c4b53 (diff)
downloadpodman-02eaebda46418d6a69a54a08066080fa24f38ebe.tar.gz
podman-02eaebda46418d6a69a54a08066080fa24f38ebe.tar.bz2
podman-02eaebda46418d6a69a54a08066080fa24f38ebe.zip
Merge pull request #12541 from flouthoc/remote_blank_entrypoint
specgen: honor empty args for entrypoint specified as `--entrypoint ""`
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgenutil/specgen.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/pkg/specgenutil/specgen.go b/pkg/specgenutil/specgen.go
index 637a6a8dd..5e4bd2f65 100644
--- a/pkg/specgenutil/specgen.go
+++ b/pkg/specgenutil/specgen.go
@@ -409,11 +409,9 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *entities.ContainerCreateOptions
s.WorkDir = c.Workdir
if c.Entrypoint != nil {
entrypoint := []string{}
- if ep := *c.Entrypoint; len(ep) > 0 {
- // Check if entrypoint specified is json
- if err := json.Unmarshal([]byte(*c.Entrypoint), &entrypoint); err != nil {
- entrypoint = append(entrypoint, ep)
- }
+ // Check if entrypoint specified is json
+ if err := json.Unmarshal([]byte(*c.Entrypoint), &entrypoint); err != nil {
+ entrypoint = append(entrypoint, *c.Entrypoint)
}
s.Entrypoint = entrypoint
}