Sha256: 90e58fe91a0dbca405d2a1d41d428515ca687565ee45e9c4e1f050f81bba4395

Contents?: true

Size: 641 Bytes

Versions: 6

Compression:

Stored size: 641 Bytes

Contents

require 'open3'

module Kontena::Cli::Plugins
  class UninstallCommand < Kontena::Command
    include Kontena::Util
    include Kontena::Cli::Common

    parameter 'NAME', 'Plugin name'
    option "--force", :flag, "Force remove", default: false, attribute_name: :forced

    def execute
      confirm unless forced?
      spinner "Uninstalling plugin #{pastel.cyan(name)}" do |spin|
        begin
          Kontena::PluginManager.instance.uninstall_plugin(name)
        rescue => ex
          $stderr.puts pastel.red("#{ex.class.name} : #{ex.message}")
          logger.error(ex)
          spin.fail
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
kontena-cli-1.3.0 lib/kontena/cli/plugins/uninstall_command.rb
kontena-cli-1.3.0.rc4 lib/kontena/cli/plugins/uninstall_command.rb
kontena-cli-1.3.0.rc3 lib/kontena/cli/plugins/uninstall_command.rb
kontena-cli-1.3.0.rc2 lib/kontena/cli/plugins/uninstall_command.rb
kontena-cli-1.3.0.rc1 lib/kontena/cli/plugins/uninstall_command.rb
kontena-cli-1.3.0.pre2 lib/kontena/cli/plugins/uninstall_command.rb