diff options
| author | Philip Puryear | 2013-09-10 03:08:08 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2013-09-10 07:25:15 -0700 |
| commit | b151c52eb9f34f10421dbe91b41210c8c08d5329 (patch) | |
| tree | 43e552cfbd10e54d52a60f38a723324bc956a50e /Library | |
| parent | 3003a4776cc5d9e1ee3d7d404f31e12bb1c1986f (diff) | |
| download | homebrew-b151c52eb9f34f10421dbe91b41210c8c08d5329.tar.bz2 | |
linkapps: overwrite broken app symlinks
Closes #22388.
Closes #22430.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-linkapps.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Contributions/cmd/brew-linkapps.rb b/Library/Contributions/cmd/brew-linkapps.rb index ce3f4960a..41f1459a2 100755 --- a/Library/Contributions/cmd/brew-linkapps.rb +++ b/Library/Contributions/cmd/brew-linkapps.rb @@ -20,13 +20,11 @@ HOMEBREW_CELLAR.subdirs.each do |rack| app_name = File.basename(app) target = "#{TARGET_DIR}/#{app_name}" - if File.exist?(target) && File.symlink?(target) - system "rm", target - elsif File.exist?(target) + if File.exist?(target) && !File.symlink?(target) onoe "#{target} already exists, skipping." next end - system "ln", "-s", app, TARGET_DIR + system "ln", "-sf", app, TARGET_DIR end end |
