From e6b09b45deb10c3d465b598e5ff91b4d3b22f2a4 Mon Sep 17 00:00:00 2001 From: Cameron Booth Date: Mon, 14 Mar 2022 12:29:49 -0700 Subject: [PATCH] Fix up error and help language --- pkg/cmd/run/rerun/rerun.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/run/rerun/rerun.go b/pkg/cmd/run/rerun/rerun.go index 0303060b4..45f231f90 100644 --- a/pkg/cmd/run/rerun/rerun.go +++ b/pkg/cmd/run/rerun/rerun.go @@ -41,7 +41,7 @@ func NewCmdRerun(f *cmdutil.Factory, runF func(*RerunOptions) error) *cobra.Comm if len(args) == 0 && opts.JobID == "" { if !opts.IO.CanPrompt() { - return cmdutil.FlagErrorf("run or job ID required when not running interactively") + return cmdutil.FlagErrorf("`` or `--job` required when not running interactively") } else { opts.Prompt = true } @@ -50,7 +50,7 @@ func NewCmdRerun(f *cmdutil.Factory, runF func(*RerunOptions) error) *cobra.Comm } if opts.RunID != "" && opts.JobID != "" { - return cmdutil.FlagErrorf("specify only one of or ") + return cmdutil.FlagErrorf("specify only one of `` or `--job`") } if runF != nil { @@ -60,7 +60,7 @@ func NewCmdRerun(f *cmdutil.Factory, runF func(*RerunOptions) error) *cobra.Comm }, } - cmd.Flags().BoolVar(&opts.OnlyFailed, "failed", false, "Rerun only failed jobs") + cmd.Flags().BoolVar(&opts.OnlyFailed, "failed", false, "Rerun only failed jobs, including dependencies") cmd.Flags().StringVarP(&opts.JobID, "job", "j", "", "Rerun a specific job from a run, including dependencies") return cmd @@ -107,7 +107,7 @@ func runRerun(opts *RerunOptions) error { return fmt.Errorf("failed to get runs: %w", err) } if len(runs) == 0 { - return errors.New("no recent runs have failed; please specify a specific run ID") + return errors.New("no recent runs have failed; please specify a specific ``") } runID, err = shared.PromptForRun(cs, runs) if err != nil {