cli: podman run/create --device use StringArray()

This options accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-12-07 16:51:45 +01:00
parent 833163ff3e
commit e763cc62b7

View File

@ -814,7 +814,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
_ = cmd.RegisterFlagCompletionFunc(volumeFlagName, AutocompleteVolumeFlag)
deviceFlagName := "device"
createFlags.StringSliceVar(
createFlags.StringArrayVar(
&cf.Devices,
deviceFlagName, devices(),
"Add a host device to the container",