aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorAlyssa Ross2016-09-15 16:01:18 +0100
committerAlyssa Ross2016-09-18 19:58:09 +0100
commit2a683f2569614850f79534a8547fd96cc52c7850 (patch)
treecd89a2f42b59d337cda690ed2550c28772b36344 /Library/Homebrew/extend
parent3d559fa79641735193636cbf6240c082e6ca171c (diff)
downloadbrew-2a683f2569614850f79534a8547fd96cc52c7850.tar.bz2
upgrade, outdated: follow alias changes
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ARGV.rb16
1 files changed, 14 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index 63e46a1e2..d9f599877 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -37,11 +37,23 @@ module HomebrewArgvExtension
f.version.update_commit(k.version.version.commit) if k.version.head?
end
end
- f
else
rack = Formulary.to_rack(name)
- Formulary.from_rack(rack, spec(nil))
+ alias_path = Formulary.factory(name).alias_path
+ f = Formulary.from_rack(rack, spec(nil), alias_path: alias_path)
end
+
+ # If this formula was installed with an alias that has since changed,
+ # then it was specified explicitly in ARGV. (Using the alias would
+ # instead have found the new formula.)
+ #
+ # Because of this, the user is referring to this specific formula,
+ # not any formula targetted by the same alias, so in this context
+ # the formula shouldn't be considered outdated if the alias used to
+ # install it has changed.
+ f.follow_installed_alias = false
+
+ f
end
end