summaryrefslogtreecommitdiff
path: root/lib/chef/recipe.rb
diff options
context:
space:
mode:
authorJos Backus <jos@catnook.com>2015-10-20 13:26:16 -0700
committerJos Backus <jos@catnook.com>2015-10-20 13:26:32 -0700
commitaf7379d0beeceacf0c7806ac1811a472dbc15a3b (patch)
tree2807fa8c7b38cedfd5636716fcfb6edb2b6e40d5 /lib/chef/recipe.rb
parentb705e745b398449e572f1ed582575eada2e4a471 (diff)
downloadchef-af7379d0beeceacf0c7806ac1811a472dbc15a3b.tar.gz
Route all tags access through Chef::Node#{tags,tag}
This should avoid node tags not being initialized properly to an empty Array.
Diffstat (limited to 'lib/chef/recipe.rb')
-rw-r--r--lib/chef/recipe.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb
index 83f3f5564b..0f9bf2655b 100644
--- a/lib/chef/recipe.rb
+++ b/lib/chef/recipe.rb
@@ -98,7 +98,7 @@ class Chef
# false<FalseClass>:: If any of the parameters are missing
def tagged?(*tags)
tags.each do |tag|
- return false unless run_context.node[:tags].include?(tag)
+ return false unless run_context.node.tags.include?(tag)
end
true
end
@@ -109,10 +109,10 @@ class Chef
# tags<Array>:: A list of tags
#
# === Returns
- # tags<Array>:: The current list of run_context.node[:tags]
+ # tags<Array>:: The current list of run_context.node.tags
def untag(*tags)
tags.each do |tag|
- run_context.node.normal[:tags].delete(tag)
+ run_context.node.tags.delete(tag)
end
end