cmd/list: fix Rubocop warnings.
This commit is contained in:
parent
5d761f651a
commit
9d782454ab
@ -29,7 +29,7 @@ module Homebrew
|
|||||||
# Unbrewed uses the PREFIX, which will exist
|
# Unbrewed uses the PREFIX, which will exist
|
||||||
# Things below use the CELLAR, which doesn't until the first formula is installed.
|
# Things below use the CELLAR, which doesn't until the first formula is installed.
|
||||||
unless HOMEBREW_CELLAR.exist?
|
unless HOMEBREW_CELLAR.exist?
|
||||||
raise NoSuchKegError.new(ARGV.named.first) unless ARGV.named.empty?
|
raise NoSuchKegError, ARGV.named.first unless ARGV.named.empty?
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ module Homebrew
|
|||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
UNBREWED_EXCLUDE_FILES = %w[.DS_Store]
|
UNBREWED_EXCLUDE_FILES = %w[.DS_Store].freeze
|
||||||
UNBREWED_EXCLUDE_PATHS = %w[
|
UNBREWED_EXCLUDE_PATHS = %w[
|
||||||
.github/*
|
.github/*
|
||||||
bin/brew
|
bin/brew
|
||||||
@ -80,7 +80,7 @@ module Homebrew
|
|||||||
share/man/man1/brew.1
|
share/man/man1/brew.1
|
||||||
share/man/whatis
|
share/man/whatis
|
||||||
share/zsh/site-functions/_brew
|
share/zsh/site-functions/_brew
|
||||||
]
|
].freeze
|
||||||
|
|
||||||
def list_unbrewed
|
def list_unbrewed
|
||||||
dirs = HOMEBREW_PREFIX.subdirs.map { |dir| dir.basename.to_s }
|
dirs = HOMEBREW_PREFIX.subdirs.map { |dir| dir.basename.to_s }
|
||||||
@ -117,7 +117,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
pinned_versions.each do |d, version|
|
pinned_versions.each do |d, version|
|
||||||
puts "#{d.basename}".concat(ARGV.include?("--versions") ? " #{version}" : "")
|
puts d.basename.to_s.concat(ARGV.include?("--versions") ? " #{version}" : "")
|
||||||
end
|
end
|
||||||
else # --versions without --pinned
|
else # --versions without --pinned
|
||||||
names.each do |d|
|
names.each do |d|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user