summaryrefslogtreecommitdiff
path: root/lib/chef/provider/service.rb
diff options
context:
space:
mode:
authorSeth Chisamore <schisamo@opscode.com>2012-11-13 16:50:12 -0500
committerSeth Chisamore <schisamo@opscode.com>2012-11-13 17:27:53 -0500
commita4977611d2db2a12a66e4502839e11f24aa8abfa (patch)
treecbc2fed0235d58d14b9ff316c1aec38808f2950e /lib/chef/provider/service.rb
parent6317bf5f07f70b8ec70ad254a5b8b3aca9b6bbe7 (diff)
downloadchef-a4977611d2db2a12a66e4502839e11f24aa8abfa.tar.gz
[CHEF-3604] why run assertions should pass on custom service commands
Diffstat (limited to 'lib/chef/provider/service.rb')
-rw-r--r--lib/chef/provider/service.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/provider/service.rb b/lib/chef/provider/service.rb
index 27af1ac970..a674f38145 100644
--- a/lib/chef/provider/service.rb
+++ b/lib/chef/provider/service.rb
@@ -163,6 +163,11 @@ class Chef
end
end
+ def custom_command_for_action?(action)
+ method_name = "#{action}_command".to_sym
+ @new_resource.respond_to?(method_name) &&
+ !!@new_resource.send(method_name)
+ end
end
end
end