mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
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:
@ -147,7 +147,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
|
||||
}
|
||||
|
||||
envFileFlagName := "env-file"
|
||||
createFlags.StringSliceVar(
|
||||
createFlags.StringArrayVar(
|
||||
&cf.EnvFile,
|
||||
envFileFlagName, []string{},
|
||||
"Read in a file of environment variables",
|
||||
|
@ -196,7 +196,7 @@ EOF
|
||||
fi
|
||||
|
||||
# Same, with --env-file
|
||||
local envfile="$PODMAN_TMPDIR/envfile-in-1"
|
||||
local envfile="$PODMAN_TMPDIR/envfile-in-1,withcomma"
|
||||
cat >$envfile <<EOF
|
||||
$prefix*
|
||||
NOT*DEFINED
|
||||
|
Reference in New Issue
Block a user