cli: podman exec --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 18:18:17 +01:00
parent 7866f6c6e1
commit 06cee546a3
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ func execFlags(cmd *cobra.Command) {
_ = cmd.RegisterFlagCompletionFunc(envFlagName, completion.AutocompleteNone) _ = cmd.RegisterFlagCompletionFunc(envFlagName, completion.AutocompleteNone)
envFileFlagName := "env-file" envFileFlagName := "env-file"
flags.StringSliceVar(&envFile, envFileFlagName, []string{}, "Read in a file of environment variables") flags.StringArrayVar(&envFile, envFileFlagName, []string{}, "Read in a file of environment variables")
_ = cmd.RegisterFlagCompletionFunc(envFileFlagName, completion.AutocompleteDefault) _ = cmd.RegisterFlagCompletionFunc(envFileFlagName, completion.AutocompleteDefault)
flags.BoolVarP(&execOpts.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached") flags.BoolVarP(&execOpts.Interactive, "interactive", "i", false, "Keep STDIN open even if not attached")