Recognize individual files to process from CLI (#23)

Recent refactor of code introduced a regression: provide individual
files to CLI resulted in all *.cr files being processed instead, so
given file was ignored.

This change restores the original behavior that allows more fine
grained execution.
This commit is contained in:
Luis Lavena 2017-11-29 05:52:40 -03:00 committed by V. Elenhaupt
parent b023ae0baa
commit 27384ed889
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ module Ameba::Cli
parser.on("-v", "--version", "Print version") { print_version }
parser.on("-h", "--help", "Show this help") { show_help parser }
parser.on("-s", "--silent", "Disable output") { opts.silent = true }
parser.unknown_args { |f| files = f if f.any? }
parser.unknown_args { |f| opts.files = f if f.any? }
parser.on("-c PATH", "--config PATH", "Specify configuration file") do |f|
opts.config = f