list: fix exit code for --verbose and --pinned
`brew list --verbose <formulae>` lists only those kegs that are installed and exits with 0 if all <formulae> installed. If one or more formulae from <formulae> are not installed, the command lists only installed versions and exits with 1. `brew --pinned formula` exits with 1 if formula is not pinned. Fixes #1172
This commit is contained in:
parent
4b5aac07f0
commit
db478fb7b2
@ -106,7 +106,11 @@ module Homebrew
|
|||||||
names = if ARGV.named.empty?
|
names = if ARGV.named.empty?
|
||||||
Formula.racks
|
Formula.racks
|
||||||
else
|
else
|
||||||
ARGV.named.map { |n| HOMEBREW_CELLAR+n }.select(&:exist?)
|
racks = ARGV.named.map { |n| HOMEBREW_CELLAR+n }
|
||||||
|
racks.select do |rack|
|
||||||
|
Homebrew.failed = true unless rack.exist?
|
||||||
|
rack.exist?
|
||||||
|
end
|
||||||
end
|
end
|
||||||
if ARGV.include? "--pinned"
|
if ARGV.include? "--pinned"
|
||||||
pinned_versions = {}
|
pinned_versions = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user