diff options
| author | Simon Sigurdhsson | 2013-06-11 22:13:39 +0200 |
|---|---|---|
| committer | Jack Nagel | 2013-06-13 10:22:03 -0500 |
| commit | ccbbed2ca8768090d1fae8970685d27ef8a36b69 (patch) | |
| tree | 03a9997dc25a56f448786180bc8546b6b43460a9 | |
| parent | 087362eacf0c5c9d2f811d41c64c5ae6c65a935f (diff) | |
| download | homebrew-ccbbed2ca8768090d1fae8970685d27ef8a36b69.tar.bz2 | |
Fix bug in `brew list --pinned`
Pinned formulae which were pinned at a previous version but then upgraded
would not be listed by `brew list --pinned`. This is due to the good old
"File.exist? thinks broken symlinks don't exist" gotcha, so the test in
the select block in list_pinned has been changed to check if the pin file
exists _or_ is a symlink.
Closes #20423.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Homebrew/cmd/list.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/list.rb b/Library/Homebrew/cmd/list.rb index c40246a81..9299260de 100644 --- a/Library/Homebrew/cmd/list.rb +++ b/Library/Homebrew/cmd/list.rb @@ -58,7 +58,8 @@ module Homebrew extend self else ARGV.named.map{ |n| HOMEBREW_CELLAR+n }.select{ |pn| pn.exist? } end.select do |d| - (HOMEBREW_LIBRARY/"PinnedKegs"/d.basename.to_s).exist? + keg_pin = (HOMEBREW_LIBRARY/"PinnedKegs"/d.basename.to_s) + keg_pin.exist? or keg_pin.symlink? end.each do |d| puts d.basename end |
