diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-06-25 18:06:00 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-06-25 18:06:00 -0400 |
commit | 77f2e8467a65ce97f44d3efa7c01c6a65c7e4c4d (patch) | |
tree | 5b071699626a4967a65d5b1d5699e1bcc3f63edd /cmd/podman/shared | |
parent | cc53adaf413ce91b73a4f9b57bda7b34068b1940 (diff) | |
download | podman-77f2e8467a65ce97f44d3efa7c01c6a65c7e4c4d.tar.gz podman-77f2e8467a65ce97f44d3efa7c01c6a65c7e4c4d.tar.bz2 podman-77f2e8467a65ce97f44d3efa7c01c6a65c7e4c4d.zip |
Fix parsing of the --tmpfs option
With StringSlice, we're seeing individual options added and
parsed separately, so `tmpfs:nosuid,nodev` turns into three tmpfs
mounts passed into pkg/sec (tmpfs:, nosuid, nodev). Swap to
StringArray to tell cobra this can't be split on commas.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman/shared')
-rw-r--r-- | cmd/podman/shared/create.go | 2 | ||||
-rw-r--r-- | cmd/podman/shared/intermediate.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/shared/create.go b/cmd/podman/shared/create.go index eee5f515d..4491e5c1b 100644 --- a/cmd/podman/shared/create.go +++ b/cmd/podman/shared/create.go @@ -690,7 +690,7 @@ func ParseCreateOpts(ctx context.Context, c *GenericCLIResults, runtime *libpod. StopTimeout: c.Uint("stop-timeout"), Sysctl: sysctl, Systemd: systemd, - Tmpfs: c.StringSlice("tmpfs"), + Tmpfs: c.StringArray("tmpfs"), Tty: tty, User: user, UsernsMode: usernsMode, diff --git a/cmd/podman/shared/intermediate.go b/cmd/podman/shared/intermediate.go index a38e4d47a..eecd1604c 100644 --- a/cmd/podman/shared/intermediate.go +++ b/cmd/podman/shared/intermediate.go @@ -448,7 +448,7 @@ func NewIntermediateLayer(c *cliconfig.PodmanCommand, remote bool) GenericCLIRes m["subuidname"] = newCRString(c, "subuidname") m["sysctl"] = newCRStringSlice(c, "sysctl") m["systemd"] = newCRBool(c, "systemd") - m["tmpfs"] = newCRStringSlice(c, "tmpfs") + m["tmpfs"] = newCRStringArray(c, "tmpfs") m["tty"] = newCRBool(c, "tty") m["uidmap"] = newCRStringSlice(c, "uidmap") m["ulimit"] = newCRStringSlice(c, "ulimit") |