Skip to content

Commit

Permalink
Added a nil check for ecs agents for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
swartzja committed Dec 14, 2020
1 parent a9f43a5 commit 2a76909
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/pages/instancespage.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ func renderInstancesTable(tableInfo *ui.TableInfo, ecsData *ecsview.ClusterData)
data := funk.Map(ecsData.Containers, func(instance *aws.EcsContainer) []string {

agentVersion := *instance.VersionInfo.AgentVersion
if agentVersion == *latestEcsAgentVersion {
if latestEcsAgentVersion == nil {
agentVersion = agentVersion + " ❓"
} else if agentVersion == *latestEcsAgentVersion {
agentVersion = agentVersion + " ✅"
} else {
agentVersion = agentVersion + " ⚠️"
Expand Down

0 comments on commit 2a76909

Please sign in to comment.