lib/git_trend/cli.rb in git-trend-1.1.8 vs lib/git_trend/cli.rb in git-trend-1.1.9
- old
+ new
@@ -4,10 +4,11 @@
class CLI < Thor
map "-v" => :version,
"--version" => :version
default_command :list
+ class_option :verbose, type: :boolean
desc :version, "show version"
def version
say "git-trend version: #{VERSION}", :green
end
@@ -26,9 +27,11 @@
formatter = Formatter.new(options[:format])
formatter.print(projects, enable_description: !!options[:description])
rescue => e
say "An unexpected #{e.class} has occurred.", :red
say e.message unless e.class.to_s == e.message
+
+ puts exception.backtrace if options[:verbose]
end
desc :languages, "Show selectable languages"
option :format, aliases: "-f", required: false, default: "text", desc: "Choose a formatter as text or json. Enable: [t, text, j, json]"
def languages