From 27384ed8899f21568b7d9f81f6bc8e492ad51417 Mon Sep 17 00:00:00 2001 From: Luis Lavena Date: Wed, 29 Nov 2017 05:52:40 -0300 Subject: [PATCH] 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. --- src/ameba/cli/cmd.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ameba/cli/cmd.cr b/src/ameba/cli/cmd.cr index fc48e8f5..25306829 100644 --- a/src/ameba/cli/cmd.cr +++ b/src/ameba/cli/cmd.cr @@ -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