Add an extra sanity check

This commit is contained in:
Jack Nagel 2014-03-15 16:56:51 -05:00
parent 13f8c7ab95
commit 3b3b782ba9

View File

@ -33,7 +33,7 @@ module HomebrewArgvExtension
linked_keg_ref = HOMEBREW_REPOSITORY/"Library/LinkedKegs"/name
if linked_keg_ref.symlink?
if linked_keg_ref.symlink? && linked_keg_ref.directory?
Keg.new(linked_keg_ref.realpath)
elsif dirs.length == 1
Keg.new(dirs.first)