diff options
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/knife/core/status_presenter.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/knife/core/status_presenter.rb b/lib/chef/knife/core/status_presenter.rb index bb6766c6ac..899da21003 100644 --- a/lib/chef/knife/core/status_presenter.rb +++ b/lib/chef/knife/core/status_presenter.rb @@ -101,6 +101,11 @@ class Chef fqdn = (node[:ec2] && node[:ec2][:public_hostname]) || node[:fqdn] name = node["name"] || node.name + if !node["ohai_time"] + ui.error("Ohai has not yet ran on node #{name}.") + exit(1) + end + hours, minutes, seconds = time_difference_in_hms(node["ohai_time"]) hours_text = "#{hours} hour#{hours == 1 ? ' ' : 's'}" minutes_text = "#{minutes} minute#{minutes == 1 ? ' ' : 's'}" |