summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-03-12 13:11:34 -0700
committerTim Smith <tsmith84@gmail.com>2020-03-12 13:11:34 -0700
commit62484a9fd9aba6b5b485d512ad1381978ccba3d4 (patch)
tree38dd731ddab78c62f7c764c8502c40e959d74e87
parentfafaa2946e80a43645e9ec88a76881ff2446c007 (diff)
downloadchef-62484a9fd9aba6b5b485d512ad1381978ccba3d4.tar.gz
Simplify returning the match
Signed-off-by: Tim Smith <tsmith@chef.io>
-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 e12b2dab04..e5e9461c71 100644
--- a/lib/chef/resource/alternatives.rb
+++ b/lib/chef/resource/alternatives.rb
@@ -126,7 +126,7 @@ class Chef
def current_path
# https://rubular.com/r/ylsuvzUtquRPqc
match = shell_out(alternatives_cmd, "--display", new_resource.link_name).stdout.match(/link currently points to (.*)/)
- match.nil? ? nil : match[1]
+ match[1]
end
#