diff options
| author | Mike McQuaid | 2017-01-11 11:13:26 -0800 |
|---|---|---|
| committer | GitHub | 2017-01-11 11:13:26 -0800 |
| commit | ebf3d939d1d63ea2cf8b8185e1c36a6e4a066d48 (patch) | |
| tree | fac9a4ff7c4867c53612e8349bea237777b17164 /Library | |
| parent | 0a7e69173dc6fa2e5adf606abb9784fd827f9afc (diff) | |
| parent | c0a29d664420bb568036f8e92654cf5e0b73da3e (diff) | |
| download | brew-ebf3d939d1d63ea2cf8b8185e1c36a6e4a066d48.tar.bz2 | |
Merge pull request #1808 from MikeMcQuaid/deprecate-linkapps
Deprecate brew (un)linkapps.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/caveats.rb | 11 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/linkapps.rb | 16 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/unlinkapps.rb | 13 | ||||
| -rw-r--r-- | Library/Homebrew/keg.rb | 4 |
4 files changed, 27 insertions, 17 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 3dfdb1c87..d1dda9d4c 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -23,7 +23,6 @@ class Caveats caveats << fish_function_caveats caveats << plist_caveats caveats << python_caveats - caveats << app_caveats caveats << elisp_caveats caveats.compact.join("\n") end @@ -169,16 +168,6 @@ class Caveats s end - def app_caveats - return unless keg - return unless keg.app_installed? - - <<-EOS.undent - .app bundles were installed. - Run `brew linkapps #{keg.name}` to symlink these to /Applications. - EOS - end - def elisp_caveats return if f.keg_only? return unless keg diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb index bd88409aa..7dd1a6b93 100644 --- a/Library/Homebrew/cmd/linkapps.rb +++ b/Library/Homebrew/cmd/linkapps.rb @@ -1,6 +1,11 @@ #: * `linkapps` [`--local`] [<formulae>]: #: Find installed formulae that provide `.app`-style macOS apps and symlink them -#: into `/Applications`, allowing for easier access. +#: into `/Applications`, allowing for easier access (deprecated). +#: +#: Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using +#: either aliases or symlinks and Homebrew formulae do not build "proper" `.app` +#: bundles that can be relocated. Instead, please consider using `brew cask` and +#: migrate formulae using `.app`s to casks. #: #: If no <formulae> are provided, all of them will have their apps symlinked. #: @@ -14,6 +19,15 @@ module Homebrew module_function def linkapps + opoo <<-EOS.undent + `brew linkapps` has been deprecated and will eventually be removed! + + Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using + either aliases or symlinks and Homebrew formulae do not build "proper" `.app` + bundles that can be relocated. Instead, please consider using `brew cask` and + migrate formulae using `.app`s to casks. + EOS + target_dir = linkapps_target(local: ARGV.include?("--local")) unless target_dir.directory? diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb index d04ef9ee4..b2ba458bf 100644 --- a/Library/Homebrew/cmd/unlinkapps.rb +++ b/Library/Homebrew/cmd/unlinkapps.rb @@ -1,5 +1,10 @@ #: * `unlinkapps` [`--local`] [`--dry-run`] [<formulae>]: -#: Remove symlinks created by `brew linkapps` from `/Applications`. +#: Remove symlinks created by `brew linkapps` from `/Applications` (deprecated). +#: +#: Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using +#: either aliases or symlinks and Homebrew formulae do not build "proper" `.app` +#: bundles that can be relocated. Instead, please consider using `brew cask` and +#: migrate formulae using `.app`s to casks. #: #: If no <formulae> are provided, all linked apps will be removed. #: @@ -15,6 +20,12 @@ module Homebrew module_function def unlinkapps + opoo <<-EOS.undent + `brew unlinkapps` has been deprecated and will eventually be removed! + + Unfortunately `brew linkapps` cannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper" `.app` bundles that can be relocated. Instead, please consider using `brew cask` and migrate formulae using `.app`s to casks. + EOS + target_dir = linkapps_target(local: ARGV.include?("--local")) unlinkapps_from_dir(target_dir, dry_run: ARGV.dry_run?) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 4312c9454..14eb0e3f3 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -367,10 +367,6 @@ class Keg Pathname.glob("#{app_prefix}/{,libexec/}*.app") end - def app_installed? - !apps.empty? - end - def elisp_installed? return false unless (path/"share/emacs/site-lisp"/name).exist? (path/"share/emacs/site-lisp"/name).children.any? { |f| %w[.el .elc].include? f.extname } |
