formula: don't return outdated head in installed_prefix
This commit is contained in:
parent
1b88c2912b
commit
a59bdc4a2a
@ -449,8 +449,8 @@ class Formula
|
|||||||
# and then {#stable}'s {#prefix}
|
# and then {#stable}'s {#prefix}
|
||||||
# @private
|
# @private
|
||||||
def installed_prefix
|
def installed_prefix
|
||||||
if head && (head_prefix = latest_head_prefix) && head_prefix.directory?
|
if head && (head_version = latest_head_version) && !head_version_outdated?(head_version)
|
||||||
head_prefix
|
latest_head_prefix
|
||||||
elsif devel && (devel_prefix = prefix(PkgVersion.new(devel.version, revision))).directory?
|
elsif devel && (devel_prefix = prefix(PkgVersion.new(devel.version, revision))).directory?
|
||||||
devel_prefix
|
devel_prefix
|
||||||
elsif stable && (stable_prefix = prefix(PkgVersion.new(stable.version, revision))).directory?
|
elsif stable && (stable_prefix = prefix(PkgVersion.new(stable.version, revision))).directory?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user