Sha256: 777ba535404ca6b2cb8be34719a99c836aef83b3059b81763dc17fd14536902c

Contents?: true

Size: 598 Bytes

Versions: 11

Compression:

Stored size: 598 Bytes

Contents

require 'sym/app/commands/base_command'
require 'sym/app/keychain'
require 'sym/errors'
module Sym
  module App
    module Commands
      class PrintKey < BaseCommand
        required_options %i(keychain key)
        incompatible_options %i(examples help version bash_support)
        try_after :show_examples, :generate_key, :encrypt, :decrypt, :password_protect_key, :keychain_add_key

        def execute
          raise Sym::Errors::NoPrivateKeyFound.new("Unable to resolve private key from argument '#{opts[:key]}'") if self.key.nil?
          self.key
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sym-3.0.2 lib/sym/app/commands/print_key.rb
sym-3.0.1 lib/sym/app/commands/print_key.rb
sym-3.0.0 lib/sym/app/commands/print_key.rb
sym-2.10.0 lib/sym/app/commands/print_key.rb
sym-2.8.5 lib/sym/app/commands/print_key.rb
sym-2.8.4 lib/sym/app/commands/print_key.rb
sym-2.8.2 lib/sym/app/commands/print_key.rb
sym-2.8.1 lib/sym/app/commands/print_key.rb
sym-2.8.0 lib/sym/app/commands/print_key.rb
sym-2.7.0 lib/sym/app/commands/print_key.rb
sym-2.6.3 lib/sym/app/commands/print_key.rb