diff options
| author | Dominyk Tiller | 2015-04-17 02:08:55 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-04-17 10:54:19 -0700 |
| commit | 27baa4cf3d3baefb35a93c736c65a8d9e7026988 (patch) | |
| tree | 3f3b6e6657f81513c707b828a8ebef77e9da96bb /Library/Homebrew/cmd | |
| parent | 7755ac0b8b7413d594d87fa5d7d555da6f7ece67 (diff) | |
| download | homebrew-27baa4cf3d3baefb35a93c736c65a8d9e7026988.tar.bz2 | |
linkapps: output nothing if no apps exist
The standard message can be somewhat confusing (#38695) in that it
outputs “finished linking” language regardless of whether an app is
actually present/linked or not.
This solution just stops it saying anything if there’s no app in the
directory. It needs a little tidying in the output here, but it’s a
discussion point.
Closes #38728.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/linkapps.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb index 7e8430c75..b21cbcd1f 100644 --- a/Library/Homebrew/cmd/linkapps.rb +++ b/Library/Homebrew/cmd/linkapps.rb @@ -25,7 +25,7 @@ module Homebrew kegs.each do |keg| keg = keg.opt_record if keg.optlinked? Dir["#{keg}/*.app", "#{keg}/bin/*.app", "#{keg}/libexec/*.app"].each do |app| - puts "Linking #{app}" + puts "Linking #{app} to #{target_dir}." app_name = File.basename(app) target = "#{target_dir}/#{app_name}" @@ -33,10 +33,9 @@ module Homebrew onoe "#{target} already exists, skipping." next end + system "ln", "-sf", app, target_dir end end - - puts "Finished linking. Find the links under #{target_dir}." end end |
