Skip to content

Commit

Permalink
refactor: make all run options have shorthand vars
Browse files Browse the repository at this point in the history
Simple nitpick refactor to have all run option flags have shorthand
vars.
  • Loading branch information
DataDavD committed May 7, 2024
1 parent 3a926ef commit 5e96483
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions options/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ func (ro *RunOptions) AddFlags(cmd *cobra.Command) {
ro.ArchivistaOptions.AddFlags(cmd)
cmd.Flags().StringVarP(&ro.WorkingDir, "workingdir", "d", "", "Directory from which commands will run")
cmd.Flags().StringSliceVarP(&ro.Attestations, "attestations", "a", DefaultAttestors, "Attestations to record ('product' and 'material' are always recorded)")
cmd.Flags().StringSliceVar(&ro.Hashes, "hashes", []string{"sha256"}, "Hashes selected for digest calculation. Defaults to SHA256")
cmd.Flags().StringSliceVarP(&ro.Hashes, "hashes", "h", []string{"sha256"}, "Hashes selected for digest calculation. Defaults to SHA256")
cmd.Flags().StringVarP(&ro.OutFilePath, "outfile", "o", "", "File to write signed data to")
cmd.Flags().StringVarP(&ro.StepName, "step", "s", "", "Name of the step being run")
cmd.Flags().BoolVar(&ro.Tracing, "trace", false, "Enable tracing for the command")
cmd.Flags().StringSliceVar(&ro.TimestampServers, "timestamp-servers", []string{}, "Timestamp Authority Servers to use when signing envelope")
cmd.Flags().BoolVarP(&ro.Tracing, "trace", "t", false, "Enable tracing for the command")
cmd.Flags().StringSliceVarP(&ro.TimestampServers, "timestamp-servers", "u", []string{}, "Timestamp Authority Servers to use when signing envelope")

cmd.MarkFlagsRequiredTogether(RequiredRunFlags...)

Expand Down

0 comments on commit 5e96483

Please sign in to comment.