summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/build_essential.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/chef/resource/build_essential.rb b/lib/chef/resource/build_essential.rb
index fdf4a48881..0944805653 100644
--- a/lib/chef/resource/build_essential.rb
+++ b/lib/chef/resource/build_essential.rb
@@ -190,10 +190,8 @@ class Chef
available_updates.error!
# https://rubular.com/r/UPEE5P7mZLvXNs
- label_match = available_updates.stdout.match(/^\s*\* (?:Label: )?(Command Line Tools.*)/)
-
# this will return the match or nil
- label_match[1] unless label_match.nil?
+ available_updates.stdout[/^\s*\* (?:Label: )?(Command Line Tools.*)/, 1]
end
end