aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/prune.rb
diff options
context:
space:
mode:
authorMartin Afanasjew2015-12-08 09:11:33 +0100
committerMartin Afanasjew2016-04-06 10:31:54 +0200
commitea38a7039552b27334efad63897bbc3ad2b7263c (patch)
tree054233c5a3b3b6f5986d08f7699dc6423941f19b /Library/Homebrew/cmd/prune.rb
parentb50e950f0ea2a5fdfc8d312d1a6eb4f4e6240fa0 (diff)
downloadbrew-ea38a7039552b27334efad63897bbc3ad2b7263c.tar.bz2
prune: handle broken app symlinks
Remove broken symlinks from `/Applications` and `~/Applications` that were previously created by `brew linkapps`, but are no longer valid because formulae were uninstalled or the provided apps have changed.
Diffstat (limited to 'Library/Homebrew/cmd/prune.rb')
-rw-r--r--Library/Homebrew/cmd/prune.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/prune.rb b/Library/Homebrew/cmd/prune.rb
index 9631f1f81..ef416a343 100644
--- a/Library/Homebrew/cmd/prune.rb
+++ b/Library/Homebrew/cmd/prune.rb
@@ -1,5 +1,6 @@
require "keg"
require "cmd/tap"
+require "cmd/unlinkapps"
module Homebrew
def prune
@@ -45,5 +46,7 @@ module Homebrew
print "and #{d} directories " if d > 0
puts "from #{HOMEBREW_PREFIX}"
end unless ARGV.dry_run?
+
+ unlinkapps_prune(:dry_run => ARGV.dry_run?, :quiet => true)
end
end