diff options
author | Serdar Sutay <serdar@opscode.com> | 2014-10-15 09:35:17 -0700 |
---|---|---|
committer | Serdar Sutay <serdar@opscode.com> | 2014-10-15 09:35:17 -0700 |
commit | 9a87e0a9dc9d9c119944538ec921678d395cb623 (patch) | |
tree | d7e0e2f5cadf2d16e14e7853e28d68e3708882d9 /lib/chef/recipe.rb | |
parent | 72f13fd58353b69fcf0f686a14cb52f8b29991a4 (diff) | |
download | chef-9a87e0a9dc9d9c119944538ec921678d395cb623.tar.gz |
Return correct value for tagged? when node[:tags] is nil.
Diffstat (limited to 'lib/chef/recipe.rb')
-rw-r--r-- | lib/chef/recipe.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb index 32578da5ab..de72a8d0c4 100644 --- a/lib/chef/recipe.rb +++ b/lib/chef/recipe.rb @@ -96,6 +96,8 @@ class Chef # true<TrueClass>:: If all the parameters are present # false<FalseClass>:: If any of the parameters are missing def tagged?(*tags) + return false if run_context.node[:tags].nil? + tags.each do |tag| return false unless run_context.node[:tags].include?(tag) end |