aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-10-06 15:20:51 +0100
committerGitHub2017-10-06 15:20:51 +0100
commit708c4e0ebd26f6a28e8071ed3a052bc75c18cfb4 (patch)
treeb494d501e94b918d3cc4f4b8326176704223b2ec /Library
parent10491e1c302d96cffe59dbfaa2e9876022fbe5aa (diff)
parent4f8af059dfd0e73f23571747cc703bda29de9b8f (diff)
downloadbrew-708c4e0ebd26f6a28e8071ed3a052bc75c18cfb4.tar.bz2
Merge pull request #3273 from MikeMcQuaid/mdfind-reject-backups
os/mac: ignore apps found in Time Machine backups.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 15c301f99..853f75140 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -229,7 +229,9 @@ module OS
end
def app_with_bundle_id(*ids)
- path = mdfind(*ids).first
+ path = mdfind(*ids)
+ .reject { |p| p.include?("/Backups.backupdb/") }
+ .first
Pathname.new(path) unless path.nil? || path.empty?
end