summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Kantrowitz <noah@coderanger.net>2015-06-30 16:45:39 -0700
committerNoah Kantrowitz <noah@coderanger.net>2015-06-30 16:45:39 -0700
commit762cc034cb4af2b215bcaca4e446c7903c052fff (patch)
tree84ff98d8958c450a4ed57c4ac3a7232b4cdbef6f
parent116e5219c717614658ecf2d7bf7f6b3420a8f6fe (diff)
downloadchef-762cc034cb4af2b215bcaca4e446c7903c052fff.tar.gz
Update comment about how action could be a non-array. [ci skip]
-rw-r--r--lib/chef/guard_interpreter/resource_guard_interpreter.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/guard_interpreter/resource_guard_interpreter.rb b/lib/chef/guard_interpreter/resource_guard_interpreter.rb
index 6372b206a7..8cff3bc032 100644
--- a/lib/chef/guard_interpreter/resource_guard_interpreter.rb
+++ b/lib/chef/guard_interpreter/resource_guard_interpreter.rb
@@ -68,7 +68,9 @@ class Chef
run_action = action || @resource.action
begin
- # Coerce to an array to be safe.
+ # Coerce to an array to be safe. This could happen with a legacy
+ # resource or something overriding the default_action code in a
+ # subclass.
Array(run_action).each {|action_to_run| @resource.run_action(action_to_run) }
resource_updated = @resource.updated
rescue Mixlib::ShellOut::ShellCommandFailed