From abd0afb1a58d1ae1325cf75ed3e59157b4761d7d Mon Sep 17 00:00:00 2001 From: Bryan Culver Date: Tue, 15 Oct 2019 00:10:57 -0400 Subject: [PATCH] CLI: Assign :database_path to value from 'database-path' in options. Simple handling for multi-word argument name. Only 'database-path' is passed into ::API check function. Likely backward compatible as setting was never honored before. Closes #15. --- lib/dependency_spy/cli.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/dependency_spy/cli.rb b/lib/dependency_spy/cli.rb index 591af64..c00562f 100644 --- a/lib/dependency_spy/cli.rb +++ b/lib/dependency_spy/cli.rb @@ -51,7 +51,10 @@ class CLI < Thor method_option('with-color', :type => :boolean, :default => true) method_option('ignore', :aliases => :i, :type => :array, :default => []) def check - manifests = API.check(options) + the_options = options.dup + the_options[:database_path] = the_options[:"database-path"] + the_options.freeze + manifests = API.check(the_options) formatted_output = if (options['formatter'] == 'text') && !options['output-path'] && options['with-color'] DependencySpy::Formatters::Text.format(manifests, options['severity-threshold'])