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)
|
fmt.Printf("\t\tfailed to retrieve task information: %v\n", task.retrieveError)
|
||||||
} else {
|
} else {
|
||||||
for n, step := range task.runTaskResponse.Steps {
|
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)
|
fmt.Printf("\t\tStep: %d, Name: %s, Type: %s, Phase: %s, ExitStatus: %d\n", n, step.Name, step.Type, step.Phase, *step.ExitStatus)
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("\t\tStep: %d, Name: %s, Type: %s, Phase: %s\n", n, step.Name, step.Type, step.Phase)
|
fmt.Printf("\t\tStep: %d, Name: %s, Type: %s, Phase: %s\n", n, step.Name, step.Type, step.Phase)
|
||||||
|
|
Loading…
Reference in New Issue