aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/reinstall.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd/reinstall.rb')
-rw-r--r--Library/Homebrew/cmd/reinstall.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb
index e51aace2a..bda6022bf 100644
--- a/Library/Homebrew/cmd/reinstall.rb
+++ b/Library/Homebrew/cmd/reinstall.rb
@@ -58,10 +58,11 @@ module Homebrew
def restore_backup(keg, formula)
path = backup_path(keg)
- if path.directory?
- path.rename keg
- keg.link unless formula.keg_only?
- end
+
+ return unless path.directory?
+
+ path.rename keg
+ keg.link unless formula.keg_only?
end
def backup_path(path)