aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2018-01-20 12:04:09 +0000
committerMike McQuaid2018-01-21 13:38:44 +0000
commitb96ec879dc405254718c7efd7ad0f966b0b80be9 (patch)
treef024d3a57dfd06893b309dbe5083452c6c7c119c /Library
parentd14fd49b3062ab1d95e86b78a8228c8aee3a3304 (diff)
downloadbrew-b96ec879dc405254718c7efd7ad0f966b0b80be9.tar.bz2
(un)linkapps: hide from manpage, use odeprecated.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/linkapps.rb15
-rw-r--r--Library/Homebrew/cmd/unlinkapps.rb15
-rw-r--r--Library/Homebrew/test/cmd/linkapps_spec.rb4
-rw-r--r--Library/Homebrew/test/cmd/unlinkapps_spec.rb4
4 files changed, 10 insertions, 28 deletions
diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb
index e8d482529..1bec67a04 100644
--- a/Library/Homebrew/cmd/linkapps.rb
+++ b/Library/Homebrew/cmd/linkapps.rb
@@ -1,3 +1,4 @@
+#: @hide_from_man_page
#: * `linkapps` [`--local`] [<formulae>]:
#: Find installed formulae that provide `.app`-style macOS apps and symlink them
#: into `/Applications`, allowing for easier access (deprecated).
@@ -6,11 +7,6 @@
#: 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.
-#:
-#: If provided, `--local` will symlink them into the user's `~/Applications`
-#: directory instead of the system directory.
require "keg"
require "formula"
@@ -19,14 +15,7 @@ module Homebrew
module_function
def linkapps
- opoo <<~EOS
- `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
+ odeprecated "'brew linkapps'"
target_dir = linkapps_target(local: ARGV.include?("--local"))
diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb
index 7f401aaeb..721e4d639 100644
--- a/Library/Homebrew/cmd/unlinkapps.rb
+++ b/Library/Homebrew/cmd/unlinkapps.rb
@@ -1,3 +1,4 @@
+#: @hide_from_man_page
#: * `unlinkapps` [`--local`] [`--dry-run`] [<formulae>]:
#: Remove symlinks created by `brew linkapps` from `/Applications` (deprecated).
#:
@@ -5,14 +6,6 @@
#: 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.
-#:
-#: If provided, `--local` will remove symlinks from the user's `~/Applications`
-#: directory instead of the system directory.
-#:
-#: If `--dry-run` or `-n` is passed, Homebrew will list all symlinks which
-#: would be removed, but will not actually delete any files.
require "cmd/linkapps"
@@ -20,11 +13,7 @@ module Homebrew
module_function
def unlinkapps
- opoo <<~EOS
- `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
+ odeprecated "'brew unlinkapps'"
target_dir = linkapps_target(local: ARGV.include?("--local"))
diff --git a/Library/Homebrew/test/cmd/linkapps_spec.rb b/Library/Homebrew/test/cmd/linkapps_spec.rb
index 2bca97822..8fc0d5eb9 100644
--- a/Library/Homebrew/test/cmd/linkapps_spec.rb
+++ b/Library/Homebrew/test/cmd/linkapps_spec.rb
@@ -10,9 +10,11 @@ describe "brew linkapps", :integration_test do
source_app = HOMEBREW_CELLAR/"testball/0.1/TestBall.app"
source_app.mkpath
+ ENV.delete "HOMEBREW_DEVELOPER"
+
expect { brew "linkapps", "--local", "HOME" => home_dir }
.to output(/Linking: #{Regexp.escape(source_app)}/).to_stdout
- .and output(/`brew linkapps` has been deprecated/).to_stderr
+ .and output(/'brew linkapps' is deprecated/).to_stderr
.and be_a_success
expect(apps_dir/"TestBall.app").to be_a_symlink
diff --git a/Library/Homebrew/test/cmd/unlinkapps_spec.rb b/Library/Homebrew/test/cmd/unlinkapps_spec.rb
index e1170f435..397a8ec5e 100644
--- a/Library/Homebrew/test/cmd/unlinkapps_spec.rb
+++ b/Library/Homebrew/test/cmd/unlinkapps_spec.rb
@@ -12,9 +12,11 @@ describe "brew unlinkapps", :integration_test do
FileUtils.ln_s source_app, apps_dir/"TestBall.app"
+ ENV.delete "HOMEBREW_DEVELOPER"
+
expect { brew "unlinkapps", "--local", "HOME" => home_dir }
.to output(%r{Unlinking: #{Regexp.escape(apps_dir)}/TestBall.app}).to_stdout
- .and output(/`brew unlinkapps` has been deprecated/).to_stderr
+ .and output(/'brew unlinkapps' is deprecated/).to_stderr
.and be_a_success
end
end