diff options
| author | Tim D. Smith | 2017-04-02 10:26:05 -0700 |
|---|---|---|
| committer | Tim D. Smith | 2017-04-02 10:26:05 -0700 |
| commit | 3b75075727786eb4f02b25a49d178f3b4a23708b (patch) | |
| tree | 62d6a95fa7ecd3dfcb05bc80042ce150854ba77a /Library | |
| parent | 2f4eaf26a035727f8541a432c8e48b75f817ac0a (diff) | |
| download | brew-3b75075727786eb4f02b25a49d178f3b4a23708b.tar.bz2 | |
rubocop
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/keg_relocate.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index 9a9902584..4ec913642 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -16,11 +16,10 @@ class Keg link = file.readlink # Don't fix relative symlinks next unless link.absolute? - if link.to_s.start_with?(HOMEBREW_CELLAR.to_s) || link.to_s.start_with?(HOMEBREW_PREFIX.to_s) - new_src = link.relative_path_from(file.parent) - file.unlink - FileUtils.ln_s(new_src, file) - end + next unless link.to_s.start_with?(HOMEBREW_CELLAR.to_s) || link.to_s.start_with?(HOMEBREW_PREFIX.to_s) + new_src = link.relative_path_from(file.parent) + file.unlink + FileUtils.ln_s(new_src, file) end end alias generic_fix_dynamic_linkage fix_dynamic_linkage |
