cmd/ejobs: remove redundant force option Change-Id: Id8404fa7db2b2c8986b4e846d851f535fb2c5c1f Reviewed-on: https://go-review.googlesource.com/c/pkgsite-metrics/+/716860 Reviewed-by: Markus Kusano <kusano@google.com> Auto-Submit: Ethan Lee <ethanalee@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/cmd/ejobs/main.go b/cmd/ejobs/main.go index 9381237..f151cb3 100644 --- a/cmd/ejobs/main.go +++ b/cmd/ejobs/main.go
@@ -55,7 +55,6 @@ noDeps bool // for start moduleFile string // for start waitInterval time.Duration // for wait - force bool // for results outfile string // for results stream bool // for results userFilter string // for list @@ -99,7 +98,6 @@ "download results as JSON", doResults, func(fs *flag.FlagSet) { - fs.BoolVar(&force, "f", false, "download even if unfinished") fs.StringVar(&outfile, "o", "", "output filename") fs.BoolVar(&stream, "stream", false, "stream output") }, @@ -564,14 +562,6 @@ if err != nil { return err } - job, err := requestJSON[jobs.Job](ctx, "jobs/describe?jobid="+jobID, ts) - if err != nil { - return err - } - done := job.NumFinished() - if !force && done < job.NumEnqueued { - return fmt.Errorf("job not finished (%d/%d completed); use -f for partial results", done, job.NumEnqueued) - } out := os.Stdout if outfile != "" { out, err = os.Create(outfile)