lib/kontena/cli/grids/remove_command.rb in kontena-cli-0.16.0.pre5 vs lib/kontena/cli/grids/remove_command.rb in kontena-cli-0.16.0.pre6

- old
+ new

@@ -13,16 +13,17 @@ token = require_token confirm_command(name) unless forced? grid = find_grid_by_name(name) if !grid.nil? - response = client(token).delete("grids/#{grid['id']}") - if response - clear_current_grid if grid['id'] == current_grid - puts "removed #{pastel.cyan(grid['name'])}" + spinner "removing #{pastel.cyan(name)} grid " do + response = client(token).delete("grids/#{grid['id']}") + if response + clear_current_grid if grid['id'] == current_grid + end end else - abort "Could not resolve grid by name [#{name}]. For a list of existing grids please run: kontena grid list".colorize(:red) + exit_with_error "Could not resolve grid by name [#{name}]. For a list of existing grids please run: kontena grid list" end end end end