bin/whereto in where_to-1.0.3 vs bin/whereto in where_to-1.0.4

- old
+ new

@@ -49,10 +49,14 @@ cmd.desc 'Only look for files with the given extension' cmd.arg_name 'extname' cmd.default_value '.mkv' cmd.flag [:e, :ext] + cmd.desc 'Print a full stack trace on error. Useful for debugging.' + cmd.default_value false + cmd.switch :debug, negatable: false + cmd.desc "Run normally, but don't actually perform renames" cmd.default_value false cmd.switch :dryrun, negatable: false cmd.action do |global_options, options, args| @@ -141,9 +145,14 @@ end on_error do |exception| # Error logic here # return false to skip default error handling - true + if @options && @options[:debug] + puts exception.backtrace + false + else + true + end end exit run(ARGV)