Skip to content

Commit

Permalink
formula: don't return outdated head in installed_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
vladshablinsky authored and xu-cheng committed Aug 6, 2016
1 parent 1b88c29 commit a59bdc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ def head_version_outdated?(version, options={})
# and then {#stable}'s {#prefix}
# @private
def installed_prefix
if head && (head_prefix = latest_head_prefix) && head_prefix.directory?
head_prefix
if head && (head_version = latest_head_version) && !head_version_outdated?(head_version)
latest_head_prefix
elsif devel && (devel_prefix = prefix(PkgVersion.new(devel.version, revision))).directory?
devel_prefix
elsif stable && (stable_prefix = prefix(PkgVersion.new(stable.version, revision))).directory?
Expand Down

0 comments on commit a59bdc4

Please sign in to comment.