diff options
| author | Philip Puryear | 2013-09-10 03:08:08 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2013-09-10 07:25:15 -0700 |
| commit | 42faf1a8607f9a7a55904f907f40b124ba4c51e5 (patch) | |
| tree | 048f8aca8f527fe8fb87873caa24cba05de58b12 /Library | |
| parent | 0b958ed607705993dc83ca0738a90ad9d12cc8c2 (diff) | |
| download | brew-42faf1a8607f9a7a55904f907f40b124ba4c51e5.tar.bz2 | |
linkapps: overwrite broken app symlinks
Closes Homebrew/homebrew#22388.
Closes Homebrew/homebrew#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 |
