mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
nil check node resources to prevent panic
This commit is contained in:
@@ -530,6 +530,9 @@ func (c *NodeStatusCommand) formatAttributes(node *api.Node) {
|
||||
}
|
||||
|
||||
func (c *NodeStatusCommand) formatDeviceAttributes(node *api.Node) {
|
||||
if node.NodeResources == nil {
|
||||
return
|
||||
}
|
||||
devices := node.NodeResources.Devices
|
||||
if len(devices) == 0 {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user