From 27597feff8d02ce864c46820a4df201c46dcd8e9 Mon Sep 17 00:00:00 2001 From: Wietse Venema <72045954+wietse-gmail@users.noreply.github.com> Date: Sun, 23 Oct 2022 19:33:39 -0400 Subject: [PATCH] Add optional (#316) * Update README.md Add missing [optional] indicators to the "verify-artifact" --help example. Signed-off-by: Wietse Venema <72045954+wietse-gmail@users.noreply.github.com> * Add missing [optional] indicators to the verify-artifact help message Signed-off-by: Wietse Venema <72045954+wietse-gmail@users.noreply.github.com> Signed-off-by: Wietse Venema <72045954+wietse-gmail@users.noreply.github.com> --- README.md | 4 ++-- cli/slsa-verifier/verify/options.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7a00059..73cc604 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,9 @@ Usage: Flags: --build-workflow-input map[] [optional] a workflow input provided by a user at trigger time in the format 'key=value'. (Only for 'workflow_dispatch' events). (default map[]) - --builder-id string the unique builder ID who created the provenance + --builder-id string [optional] the unique builder ID who created the provenance -h, --help help for verify-artifact - --print-provenance print the verified provenance to stdout + --print-provenance [optional] print the verified provenance to stdout --provenance-path string path to a provenance file --source-branch string [optional] expected branch the binary was compiled from --source-tag string [optional] expected tag the binary was compiled from diff --git a/cli/slsa-verifier/verify/options.go b/cli/slsa-verifier/verify/options.go index 80c67a4..c5c4796 100644 --- a/cli/slsa-verifier/verify/options.go +++ b/cli/slsa-verifier/verify/options.go @@ -50,7 +50,7 @@ func (o *VerifyOptions) AddFlags(cmd *cobra.Command) { cmd.Flags().Var(&o.BuildWorkflowInputs, "build-workflow-input", "[optional] a workflow input provided by a user at trigger time in the format 'key=value'. (Only for 'workflow_dispatch' events on GitHub Actions).") - cmd.Flags().StringVar(&o.BuilderID, "builder-id", "", "the unique builder ID who created the provenance") + cmd.Flags().StringVar(&o.BuilderID, "builder-id", "", "[optional] the unique builder ID who created the provenance") /* Source options */ cmd.Flags().StringVar(&o.SourceURI, "source-uri", "", @@ -68,7 +68,7 @@ func (o *VerifyOptions) AddFlags(cmd *cobra.Command) { "path to a provenance file") cmd.Flags().BoolVar(&o.PrintProvenance, "print-provenance", false, - "print the verified provenance to stdout") + "[optional] print the verified provenance to stdout") cmd.MarkFlagRequired("source-uri") cmd.MarkFlagsMutuallyExclusive("source-versioned-tag", "source-tag")