Sha256: c2594e983e1979ae978ad83ae1568eda0db8f8dea7a5b99a6fe4d073efaa3d7a

Contents?: true

Size: 526 Bytes

Versions: 6

Compression:

Stored size: 526 Bytes

Contents

require "shelly/cli/main"

module Shelly
  module CLI
    class Runner < Thor::Shell::Basic
      include Helpers
      attr_accessor :args

      def initialize(args = [])
        super()
        @args = args
      end

      def debug?
        args.include?("--debug") || ENV['SHELLY_DEBUG'] == "true"
      end

      def start
        Shelly::CLI::Main.start(args)
      rescue => e
        raise e if debug?
        say_error "Unknown error, to see debug information run command with --debug"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shelly-0.0.43 lib/shelly/cli/runner.rb
shelly-0.0.41 lib/shelly/cli/runner.rb
shelly-0.0.41.pre lib/shelly/cli/runner.rb
shelly-0.0.40 lib/shelly/cli/runner.rb
shelly-0.0.39 lib/shelly/cli/runner.rb
shelly-0.0.38 lib/shelly/cli/runner.rb