diff --git a/commands/history/inspect_attachment.go b/commands/history/inspect_attachment.go index 80cc02e5f..52fd683b9 100644 --- a/commands/history/inspect_attachment.go +++ b/commands/history/inspect_attachment.go @@ -118,9 +118,9 @@ func attachmentCmd(dockerCli command.Cli, rootOpts RootOptions) *cobra.Command { var options attachmentOptions cmd := &cobra.Command{ - Use: "attachment [OPTIONS] REF [DIGEST]", + Use: "attachment [OPTIONS] [REF [DIGEST]]", Short: "Inspect a build record attachment", - Args: cobra.RangeArgs(1, 2), + Args: cobra.MaximumNArgs(2), RunE: func(cmd *cobra.Command, args []string) error { if len(args) > 0 { options.ref = args[0] diff --git a/docs/reference/buildx_history_inspect_attachment.md b/docs/reference/buildx_history_inspect_attachment.md index d4a4deb40..5131f5d51 100644 --- a/docs/reference/buildx_history_inspect_attachment.md +++ b/docs/reference/buildx_history_inspect_attachment.md @@ -1,7 +1,7 @@ # docker buildx history inspect attachment ```text -docker buildx history inspect attachment [OPTIONS] REF [DIGEST] +docker buildx history inspect attachment [OPTIONS] [REF [DIGEST]] ```