diff options
author | Karel Minarik <karmi@karmi.cz> | 2011-12-11 15:21:29 +0100 |
---|---|---|
committer | Bryan McLellan <btm@opscode.com> | 2012-02-09 11:47:24 -0800 |
commit | 0457ffeb86fcf16482d7d7d644218cde7bd85180 (patch) | |
tree | 3dc7898f31143164bbb4a8fd19f777234b1418d0 | |
parent | 35c64db3f6ddd744a4e0865422441da383d9c01f (diff) | |
download | chef-0457ffeb86fcf16482d7d7d644218cde7bd85180.tar.gz |
[FIX] Rescue correct exception when "node.fqdn" is not defined
When `node.fqdn` is not defined, the exception raised is "ArgumentError" (`Attribute fqdn is not defined`).
Should probably use `node.hostname` when `node.fqdn` is undefined.
-rw-r--r-- | chef/lib/chef/shef.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chef/lib/chef/shef.rb b/chef/lib/chef/shef.rb index ae81d072a7..23a5193c6d 100644 --- a/chef/lib/chef/shef.rb +++ b/chef/lib/chef/shef.rb @@ -144,7 +144,7 @@ module Shef def self.greeting " #{Etc.getlogin}@#{Shef.session.node.fqdn}" - rescue NameError + rescue NameError, ArgumentError "" end |