Merge pull request #3166 from pkrolikowski/fix-panic-deployment-latest

[cli] Fix panic while running latest deployment command witch -latest flag
This commit is contained in:
Alex Dadgar 2017-09-06 16:55:16 -07:00 committed by GitHub
commit 1e8d0bfabb
1 changed files with 3 additions and 0 deletions

View File

@ -169,6 +169,9 @@ func getDeployment(client *api.Deployments, dID string) (match *api.Deployment,
}
func formatDeployment(d *api.Deployment, uuidLength int) string {
if d == nil {
return "No deployment found"
}
// Format the high-level elements
high := []string{
fmt.Sprintf("ID|%s", limit(d.ID, uuidLength)),