Skip to content

Commit b238100

Browse files
committed
Merge pull request #154 from rcode5/fix-for-exclude-commandline-option-failure
Refactor initialization of exclude options
2 parents 1cbf044 + b6bd076 commit b238100

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/annotate

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ OptionParser.new do |opts|
119119
end
120120
end
121121

122-
opts.on('-e', '--exclude [tests,fixtures,factories]', ['tests','fixtures','factories'], "Do not annotate fixtures, test files, and/or factories") do |exclusions|
122+
opts.on('-e', '--exclude [DIRS]', ['tests','fixtures','factories'], "Do not annotate fixtures, test files, and/or factories") do |exclusions|
123+
exclusions ||= %w(tests fixtures factories)
123124
exclusions.each { |exclusion| ENV["exclude_#{exclusion}"] = "yes" }
124125
end
125126

0 commit comments

Comments
 (0)