aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/unlinkapps.rb
AgeCommit message (Collapse)Author
2016-10-02Remove `private_class_method` from commands.Markus Reiter
2016-10-02Use `module_function` for commands.Markus Reiter
2016-09-17rubocop --auto-correct all hash-rocket usage.Mike McQuaid
2016-09-11cmd/unlinkapps: fix Rubocop warnings.Mike McQuaid
2016-04-10Add all the top level commentsMax Nordlund
2016-04-06prune: handle broken app symlinksMartin Afanasjew
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.
2016-04-06unlinkapps: add --dry-run optionMartin Afanasjew
Add `--dry-run` option as is customary for destructive commands. Update `bash` completion and man page accordingly. Also correct and update documentation for both `brew linkapps` and `brew unlinkapps` in more general terms.
2016-04-06unlinkapps: modernizeMartin Afanasjew
Simplify code by using `Pathname` methods as much as possible. Also avoid calling external commands for basic functionality like unlinking, reduce code duplication by using a method from `cmd/linkapps.rb`, count unlinked symlinks with `ObserverPathnameExtension`, and adjust output for consistency with `brew linkapps`.
2015-10-20unlinkapps: avoid deleting too many symlinksMartin Afanasjew
Use `start_with?` to make sure the symlink actually points into one of the Homebrew directories (depending on given arguments). Previously, only a substring match was used, which would also remove a symlink to a hypothetical `/opt/unrelated/usr/local/opt/Unrelated.app`. Even if unlikely to occur, altering stuff unrelated to Homebrew is bad. Furthermore, make sure to always use a trailing slash with directories. Otherwise, e.g., `brew unlinkapps qt` will unlink .app bundles of both `qt` and `qt5` if both are installed and `brew linkapps qt qt5` was issued before. (Please ignore that `qt` and `qt5` offer a conflicting set of .app bundles. This will have to be addressed elsewhere.) Closes Homebrew/homebrew#45174. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-12-19(un)linkapps: allow unlink/link specific formulae.Xu Cheng
Closes Homebrew/homebrew#35080. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-06-19Only "extend self" once on the Homebrew moduleJack Nagel
2013-10-29New command: `brew unlinkapps`Teo Ljungberg
The name is pretty self explanatory, it unlinks all installed applications found under `brew --prefix` from either `~/Applications` or `/Applications` Closes Homebrew/homebrew#22729. Signed-off-by: Adam Vandenberg <flangy@gmail.com>