diff options
| author | Mike McQuaid | 2016-09-19 15:22:24 +0100 |
|---|---|---|
| committer | GitHub | 2016-09-19 15:22:24 +0100 |
| commit | c45119de75e70f32e3b3fdcccb210a88282a2f26 (patch) | |
| tree | 9f3bd4abbc80df1ca391537da0c195281e9a94a7 /Library/Homebrew/extend | |
| parent | 7ed7e3cd1a22a258ab8336b1f34b258ab8774e04 (diff) | |
| parent | d89a696d83cd325656e30a99cb4ba8342ffb39c9 (diff) | |
| download | brew-c45119de75e70f32e3b3fdcccb210a88282a2f26.tar.bz2 | |
Merge pull request #971 from penman/follow_alias
Make `brew upgrade` and `brew outdated` follow alias changes
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ARGV.rb | 16 |
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 |
