summaryrefslogtreecommitdiff
path: root/lib/chef/resource/alternatives.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-03-12 16:47:55 -0700
committerTim Smith <tsmith84@gmail.com>2020-03-12 16:47:55 -0700
commit03d92084982f7e69d251cf4c9fd90059ac6f8ef5 (patch)
tree580618ce2567e285053f2b23c950b408833bf699 /lib/chef/resource/alternatives.rb
parent9d1d8cb8223cba771591de399bcdc97a3d618ee7 (diff)
downloadchef-03d92084982f7e69d251cf4c9fd90059ac6f8ef5.tar.gz
Add the final two sets of specs
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/alternatives.rb')
-rw-r--r--lib/chef/resource/alternatives.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/alternatives.rb b/lib/chef/resource/alternatives.rb
index ab99365399..a1ecb50439 100644
--- a/lib/chef/resource/alternatives.rb
+++ b/lib/chef/resource/alternatives.rb
@@ -115,7 +115,7 @@ class Chef
def path_priority
# https://rubular.com/r/IcUlEU0mSNaMm3
escaped_path = Regexp.new(Regexp.escape("#{new_resource.path} - priority ") + "(.*)")
- match = shell_out("#{alternatives_cmd} --display #{new_resource.link_name}").stdout.match(escaped_path)
+ match = shell_out(alternatives_cmd, "--display", new_resource.link_name).stdout.match(escaped_path)
match.nil? ? nil : match[1].to_i
end