summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-03-20 10:18:08 -0700
committerTim Smith <tsmith@chef.io>2018-03-20 10:34:58 -0700
commit15fd4764bd69bf42d0275da1c21ac0a9a3823289 (patch)
tree08a296143fd7e10417a0e9283f0a09be785ffc6d
parentfbec202d1db064e85ebfa302759684b48e0e6545 (diff)
downloadchef-15fd4764bd69bf42d0275da1c21ac0a9a3823289.tar.gz
Simplify the if installed logic for macos
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/build_essential.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/resource/build_essential.rb b/lib/chef/resource/build_essential.rb
index c0b7483ffb..2382f2a1e4 100644
--- a/lib/chef/resource/build_essential.rb
+++ b/lib/chef/resource/build_essential.rb
@@ -122,10 +122,7 @@ class Chef
def xcode_cli_installed?
cmd = Mixlib::ShellOut.new("pkgutil --pkgs=com.apple.pkg.CLTools_Executables")
cmd.run_command
- cmd.error!
- true
- rescue Mixlib::ShellOut::ShellCommandFailed
- false
+ cmd.error? ? false : true
end
end