style: no args default to Library/Homebrew.

This commit is contained in:
Mike McQuaid 2016-09-18 14:28:31 +01:00
parent 3686243e5a
commit 263a8a0b73

View File

@ -19,7 +19,7 @@ require "utils/json"
module Homebrew module Homebrew
def style def style
target = if ARGV.named.empty? target = if ARGV.named.empty?
[HOMEBREW_LIBRARY] [HOMEBREW_LIBRARY_PATH]
elsif ARGV.named.any? { |file| File.exist? file } elsif ARGV.named.any? { |file| File.exist? file }
ARGV.named ARGV.named
elsif ARGV.named.any? { |tap| tap.count("/") == 1 } elsif ARGV.named.any? { |tap| tap.count("/") == 1 }