diff options
author | Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> | 2019-09-12 17:40:48 +0900 |
---|---|---|
committer | Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp> | 2019-09-27 17:17:12 +0900 |
commit | 21363a6442022fc9c6fd05e70a363915f24f27a5 (patch) | |
tree | 921339f28b7e631502041b68e556492839e68001 /cmd | |
parent | ce31aa37d6ca4762f4a82274452e089024529444 (diff) | |
download | podman-21363a6442022fc9c6fd05e70a363915f24f27a5.tar.gz podman-21363a6442022fc9c6fd05e70a363915f24f27a5.tar.bz2 podman-21363a6442022fc9c6fd05e70a363915f24f27a5.zip |
syntax updated for podman import --change
currently, podman import change do not support syntax like
- KEY val
- KEY ["val"]
This adds support for both of these syntax along with KEY=val
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/import.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/podman/import.go b/cmd/podman/import.go index d49792f27..027fa7299 100644 --- a/cmd/podman/import.go +++ b/cmd/podman/import.go @@ -39,7 +39,7 @@ func init() { importCommand.SetHelpTemplate(HelpTemplate()) importCommand.SetUsageTemplate(UsageTemplate()) flags := importCommand.Flags() - flags.StringSliceVarP(&importCommand.Change, "change", "c", []string{}, "Apply the following possible instructions to the created image (default []): CMD | ENTRYPOINT | ENV | EXPOSE | LABEL | STOPSIGNAL | USER | VOLUME | WORKDIR") + flags.StringArrayVarP(&importCommand.Change, "change", "c", []string{}, "Apply the following possible instructions to the created image (default []): CMD | ENTRYPOINT | ENV | EXPOSE | LABEL | STOPSIGNAL | USER | VOLUME | WORKDIR") flags.StringVarP(&importCommand.Message, "message", "m", "", "Set commit message for imported image") flags.BoolVarP(&importCommand.Quiet, "quiet", "q", false, "Suppress output") @@ -56,7 +56,6 @@ func importCmd(c *cliconfig.ImportValues) error { source string reference string ) - args := c.InputArgs switch len(args) { case 0: @@ -81,7 +80,7 @@ func importCmd(c *cliconfig.ImportValues) error { if runtime.Remote { quiet = false } - iid, err := runtime.Import(getContext(), source, reference, c.StringSlice("change"), c.String("message"), quiet) + iid, err := runtime.Import(getContext(), source, reference, importCommand.Change, c.String("message"), quiet) if err == nil { fmt.Println(iid) } |