Skip to content
Permalink
Browse files

Merge pull request #784 from jistr/plugins-dirs-fix

Don't crash on rabbitmq_plugins_dirs fact if rabbitmqctl is not present
  • Loading branch information...
wyardley committed Mar 27, 2019
2 parents 5477e69 + ce7d4ce commit 7613f08657d6640b22ec0f4cb55cf5b3c2f2e397
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/facter/rabbitmq_plugins_dirs.rb
@@ -2,8 +2,8 @@
setcode do
if Facter::Util::Resolution.which('rabbitmqctl')
rabbitmq_pluginsdirs_env = Facter::Core::Execution.execute("rabbitmqctl eval 'application:get_env(rabbit, plugins_dir).'")
rabbitmq_plugins_dirs = %r{^\{ok\,\"(\/.+\/\w+)}.match(rabbitmq_pluginsdirs_env)[1]
rabbitmq_plugins_dirs.split(':')
rabbitmq_plugins_dirs_match = %r{^\{ok\,\"(\/.+\/\w+)}.match(rabbitmq_pluginsdirs_env)
rabbitmq_plugins_dirs_match[1].split(':') if rabbitmq_plugins_dirs_match
end
end
end

0 comments on commit 7613f08

Please sign in to comment.
You can’t perform that action at this time.