Skip to content

Commit

Permalink
formula: fix specified_path for aliases without core tap
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Dec 1, 2023
1 parent e6dfc9a commit 27730f6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -343,13 +343,14 @@ def full_installed_alias_name

# The path that was specified to find this formula.
def specified_path
default_specified_path = Pathname(T.must(alias_path)) if alias_path.present?
default_specified_path ||= @unresolved_path
alias_pathname = Pathname(T.must(alias_path)) if alias_path.present?
return alias_pathname if alias_pathname&.exist?

return @unresolved_path if @unresolved_path.exist?

return default_specified_path if default_specified_path.presence&.exist?
return local_bottle_path if local_bottle_path.presence&.exist?

default_specified_path
alias_pathname || @unresolved_path
end

# The name specified to find this formula.
Expand Down

0 comments on commit 27730f6

Please sign in to comment.