Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Commit 11221f8

Browse files
committed
cli: Only show CompleteTime if set
Prior to this commit, the `waypoint pipeline list` CLI would attempt to show an invalid complete time, even if not set on the job. This would mean if you started a pipeline, the list CLI would claim that the pipeline completed "a long time ago", which is really code for that timestamp being nil. This commit fixes that behavior by only setting the complete time string if set on the job. Fixes #3748
1 parent f55642b commit 11221f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/cli/pipeline_list.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ func (c *PipelineListCommand) Run(args []string) int {
131131
return 1
132132
}
133133

134-
lastRunEnd = humanize.Time(j.CompleteTime.AsTime())
134+
if j.CompleteTime != nil {
135+
lastRunEnd = humanize.Time(j.CompleteTime.AsTime())
136+
}
135137
state = strings.ToLower(lastRun.State.String())
136138
}
137139

0 commit comments

Comments
 (0)