diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-04-02 11:56:27 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-04-02 11:56:27 -0700 |
commit | 24abfbc3c851bbb1da1aeaffd5c41c9d58c420db (patch) | |
tree | c3b40cd2ea313ba00cc867ddcf7866b83824d610 | |
parent | 37595990c7d8e0a078eceb9c1cb182b47b4071c3 (diff) | |
download | chef-build_essential_macos_15.tar.gz |
Simplify the matching code per code reviewbuild_essential_macos_15
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/build_essential.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/chef/resource/build_essential.rb b/lib/chef/resource/build_essential.rb index 10ff24ca9d..de9e5f0473 100644 --- a/lib/chef/resource/build_essential.rb +++ b/lib/chef/resource/build_essential.rb @@ -161,10 +161,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&.first + available_updates.stdout[/^\s*\* (?:Label: )?(Command Line Tools.*)/, 1] end end |