diff options
Diffstat (limited to 'Library/Homebrew/formula.rb')
| -rw-r--r-- | Library/Homebrew/formula.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 443619206..523de244d 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -252,12 +252,14 @@ class Formula public - # The alias path that was used to install this formula, if present. + # The alias path that was used to install this formula, if it exists. # Can differ from alias_path, which is the alias used to find the formula, # and is specified to this instance. def installed_alias_path path = build.source["path"] if build.is_a?(Tab) - path if path =~ %r{#{HOMEBREW_TAP_DIR_REGEX}/Aliases} + return unless path =~ %r{#{HOMEBREW_TAP_DIR_REGEX}/Aliases} + return unless File.symlink?(path) + path end def installed_alias_name @@ -1555,6 +1557,8 @@ class Formula hide.include?(d.name) || d.installed_prefixes.empty? end missing_dependencies + rescue FormulaUnavailableError + [] end # @private |
