cli: podman run/create --env-file use StringArray()

This option 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:39:22 +01:00
parent ef10073b51
commit b011aa4430
2 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
} }
envFileFlagName := "env-file" envFileFlagName := "env-file"
createFlags.StringSliceVar( createFlags.StringArrayVar(
&cf.EnvFile, &cf.EnvFile,
envFileFlagName, []string{}, envFileFlagName, []string{},
"Read in a file of environment variables", "Read in a file of environment variables",

View File

@ -196,7 +196,7 @@ EOF
fi fi
# Same, with --env-file # Same, with --env-file
local envfile="$PODMAN_TMPDIR/envfile-in-1" local envfile="$PODMAN_TMPDIR/envfile-in-1,withcomma"
cat >$envfile <<EOF cat >$envfile <<EOF
$prefix* $prefix*
NOT*DEFINED NOT*DEFINED