style: allow passing arbitrary file paths

This commit is contained in:
Xu Cheng 2015-08-06 15:39:08 +08:00
parent e9180b39f5
commit 2c3084a0a2

View File

@ -2,6 +2,8 @@ module Homebrew
def style
target = if ARGV.named.empty?
[HOMEBREW_LIBRARY]
elsif ARGV.named.any? { |file| File.exist? file }
ARGV.named
else
ARGV.formulae.map(&:path)
end