diff --git a/cmd/podman/manifest/annotate.go b/cmd/podman/manifest/annotate.go index 73f1b18cbd..c628e3e0fe 100644 --- a/cmd/podman/manifest/annotate.go +++ b/cmd/podman/manifest/annotate.go @@ -31,7 +31,7 @@ func init() { flags := annotateCmd.Flags() annotationFlagName := "annotation" - flags.StringSliceVar(&manifestAnnotateOpts.Annotation, annotationFlagName, nil, "set an `annotation` for the specified image") + flags.StringArrayVar(&manifestAnnotateOpts.Annotation, annotationFlagName, nil, "set an `annotation` for the specified image") _ = annotateCmd.RegisterFlagCompletionFunc(annotationFlagName, completion.AutocompleteNone) archFlagName := "arch" diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index 7c60e67978..071239f4fb 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -347,7 +347,7 @@ add_compression = ["zstd"]`), 0o644) session = podmanTest.Podman([]string{"manifest", "add", "foo", imageListInstance}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) - session = podmanTest.Podman([]string{"manifest", "annotate", "--annotation", "hello=world", "--arch", "bar", "foo", imageListARM64InstanceDigest}) + session = podmanTest.Podman([]string{"manifest", "annotate", "--annotation", "hello=world,withcomma", "--arch", "bar", "foo", imageListARM64InstanceDigest}) session.WaitWithDefaultTimeout() Expect(session).Should(ExitCleanly()) session = podmanTest.Podman([]string{"manifest", "inspect", "foo"}) @@ -355,7 +355,7 @@ add_compression = ["zstd"]`), 0o644) Expect(session).Should(ExitCleanly()) Expect(session.OutputToString()).To(ContainSubstring(`"architecture": "bar"`)) // Check added annotation - Expect(session.OutputToString()).To(ContainSubstring(`"hello": "world"`)) + Expect(session.OutputToString()).To(ContainSubstring(`"hello": "world,withcomma"`)) }) It("remove digest", func() {