From 2a683f2569614850f79534a8547fd96cc52c7850 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 15 Sep 2016 16:01:18 +0100 Subject: upgrade, outdated: follow alias changes --- Library/Homebrew/extend/ARGV.rb | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Library/Homebrew/extend') 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 -- cgit v1.2.3