lib/githuh/cli/launcher.rb in githuh-0.2.1 vs lib/githuh/cli/launcher.rb in githuh-0.3.0

- old
+ new

@@ -4,10 +4,12 @@ require 'forwardable' require 'tty/box' require 'tty/screen' require 'githuh' +require 'githuh/cli/commands/base' + module Githuh module CLI class Launcher attr_accessor :argv, :stdin, :stdout, :stderr, :kernel, :command @@ -31,14 +33,15 @@ Githuh.configure_kernel_behavior! help: true else Githuh.configure_kernel_behavior! end + # noinspection RubyYardParamTypeMatch self.command = ::Dry::CLI.new(::Githuh::CLI::Commands) command.call(arguments: argv, out: stdout, err: stderr) rescue StandardError => e lines = [e.message.gsub(/\n/, ', ')] - if e.backtrace + if e.backtrace && !(ARGV & %w[-v --verbose]).empty? lines << '' lines.concat(e.backtrace) end box = TTY::Box.frame(*lines,