From 8e51a9932eaee224ef6d3f8b76f3dabba1ddf07e Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 3 Aug 2018 08:37:03 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20use=20`mdfind`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/brewcask-ci.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/brewcask-ci.rb b/cmd/brewcask-ci.rb index 6a7788c5b5..8030e74b45 100755 --- a/cmd/brewcask-ci.rb +++ b/cmd/brewcask-ci.rb @@ -50,10 +50,8 @@ module Hbc checks = { installed_apps: Diffable.new do - sleep(5) # Allow `mdfind` to refresh. - system_command!("/usr/bin/mdfind", args: ["-onlyin", "/", "kMDItemContentType == com.apple.application-bundle"], print_stderr: false) - .stdout - .split("\n") + ["/Applications", File.expand_path("~/Applications")] + .flat_map { |dir| Dir["#{dir}/**/*.app"] } end, installed_kexts: Diffable.new do system_command!("/usr/sbin/kextstat", args: ["-kl"], print_stderr: false)