aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-08-06 15:39:08 +0800
committerXu Cheng2015-08-06 17:23:55 +0800
commit2c3084a0a26892d68b6af19f8996c6ce58a55f02 (patch)
tree3285e7474675c1d8b4c296fb904bb0eed1259a73 /Library
parente9180b39f50ad5644f1f1a23fbc30f52b75d7aa5 (diff)
downloadbrew-2c3084a0a26892d68b6af19f8996c6ce58a55f02.tar.bz2
style: allow passing arbitrary file paths
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/style.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb
index 3f28207ea..6237103f9 100644
--- a/Library/Homebrew/cmd/style.rb
+++ b/Library/Homebrew/cmd/style.rb
@@ -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