Skip to content

Commit

Permalink
command: info, show indicator on no data
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatczuk committed Jan 10, 2022
1 parent b0785d0 commit 2584e27
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/command/info/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ func (cmd *command) run(args []string) error {
if err := ti.Render(w); err != nil {
return err
}
fmt.Fprintln(w)

runs, err := cmd.client.GetTaskHistory(cmd.Context(), cmd.cluster, taskType, taskID, int64(cmd.limit))
if err != nil {
return err
}
if len(runs) > 0 {
fmt.Fprintln(w)
if len(runs) == 0 {
fmt.Fprintln(w, "No runs yet.")
return nil
}

return runs.Render(w)
}

0 comments on commit 2584e27

Please sign in to comment.