Merge pull request #314 from sgotti/fix_cmd_run_list_panic_on_nil_task_exit_status
cmd: fix run list panic on task with nil exit status
This commit is contained in:
commit
3c13ae7ba0
|
@ -83,7 +83,7 @@ func printRuns(runs []*runDetails) {
|
|||
fmt.Printf("\t\tfailed to retrieve task information: %v\n", task.retrieveError)
|
||||
} else {
|
||||
for n, step := range task.runTaskResponse.Steps {
|
||||
if step.Phase.IsFinished() && step.Type == "run" {
|
||||
if step.Phase.IsFinished() && step.Type == "run" && step.ExitStatus != nil {
|
||||
fmt.Printf("\t\tStep: %d, Name: %s, Type: %s, Phase: %s, ExitStatus: %d\n", n, step.Name, step.Type, step.Phase, *step.ExitStatus)
|
||||
} else {
|
||||
fmt.Printf("\t\tStep: %d, Name: %s, Type: %s, Phase: %s\n", n, step.Name, step.Type, step.Phase)
|
||||
|
|
Loading…
Reference in New Issue