summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRanjib Dey <ranjib@linux.com>2015-09-20 20:52:56 -0700
committerJohn Keiser <john@johnkeiser.com>2015-09-28 17:34:54 -0700
commit857b159344ccbc07af06d45854eb8b2f6dc77d11 (patch)
treeb464a3973ac37abe025f9905ea8a50ffefd737bd
parentc63466a63d7e46ec97a64575054d0639c16808b7 (diff)
downloadchef-857b159344ccbc07af06d45854eb8b2f6dc77d11.tar.gz
return empty array if no services found
-rw-r--r--lib/chef/platform/service_helpers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/platform/service_helpers.rb b/lib/chef/platform/service_helpers.rb
index d50812e687..1523747023 100644
--- a/lib/chef/platform/service_helpers.rb
+++ b/lib/chef/platform/service_helpers.rb
@@ -126,7 +126,7 @@ class Chef
# this splits off the suffix after the last dot to return "sshd"
services += services.select {|s| s.match(/\.service$/) }.map { |s| s.sub(/(.*)\.service$/, '\1') }
rescue Mixlib::ShellOut::ShellCommandFailed
- false
+ []
end
def platform_has_systemd_unit?(service_name)