Skip to content

Commit bb578ab

Browse files
authored
Merge pull request #3166 from pkrolikowski/fix-panic-deployment-latest
[cli] Fix panic while running latest deployment command witch -latest flag
2 parents 3e34a23 + 395161c commit bb578ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

command/deployment_status.go

+3
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ func getDeployment(client *api.Deployments, dID string) (match *api.Deployment,
169169
}
170170

171171
func formatDeployment(d *api.Deployment, uuidLength int) string {
172+
if d == nil {
173+
return "No deployment found"
174+
}
172175
// Format the high-level elements
173176
high := []string{
174177
fmt.Sprintf("ID|%s", limit(d.ID, uuidLength)),

0 commit comments

Comments
 (0)