Sha256: 922f51dd5fe1f741cc49972369927d613b641acc835516b6e062774f82c4b1b9
Contents?: true
Size: 623 Bytes
Versions: 34
Compression:
Stored size: 623 Bytes
Contents
module Kontena::Cli::Registry class RemoveCommand < Kontena::Command include Kontena::Cli::Common option "--force", :flag, "Force remove", default: false, attribute_name: :forced def execute require_api_url token = require_token confirm unless forced? name = 'registry' registry = client(token).get("stacks/#{current_grid}/#{name}") rescue nil exit_with_error("Stack #{pastel.cyan(name)} does not exist") if registry.nil? spinner "Removing #{pastel.cyan(name)} stack " do client(token).delete("stacks/#{current_grid}/#{name}") end end end end
Version data entries
34 entries across 34 versions & 2 rubygems