diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 3ef27748ce..19c826d44c 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -72,7 +72,7 @@ module Homebrew if f.installed? msg = "#{f.full_name}-#{f.installed_version} already installed" unless f.linked_keg.symlink? - if Pathname.new("#{HOMEBREW_CELLAR}/#{f.oldname}").exist? + if f.oldname && (HOMEBREW_CELLAR/f.oldname).exist? msg << ", it's just not migrated" elsif !f.keg_only? msg << ", it's just not linked"