class Kontena::Cli::Stacks::Registry::RemoveCommand

Public Instance Methods

execute() click to toggle source
# File lib/kontena/cli/stacks/registry/remove_command.rb, line 15
def execute
  unless force?
    if stack_name.version
      puts "About to delete #{pastel.cyan("#{stack_name}")} from the stacks registry"
      confirm
    else
      puts "About to delete an entire stack and all of its versions from the stacks registry"
      confirm_command(stack_name)
    end
  end
  spinner "Removing #{pastel.cyan(stack_name)} from the registry" do
    stacks_client.destroy(stack_name)
  end
end