diff --git a/lib/uffizzi/cli/cluster.rb b/lib/uffizzi/cli/cluster.rb index 1c8d9fe2..74bab423 100644 --- a/lib/uffizzi/cli/cluster.rb +++ b/lib/uffizzi/cli/cluster.rb @@ -241,7 +241,7 @@ def handle_update_kubeconfig_command(project_slug, command_args) end def handle_sleep_command(project_slug, command_args) - cluster_name = command_args[:cluster_name] || ConfigFile.read_option(:current_cluster)[:name] + cluster_name = command_args[:cluster_name] || ConfigFile.read_option(:current_cluster).try(:name) return handle_missing_cluster_name_error if cluster_name.nil? response = scale_down_cluster(ConfigFile.read_option(:server), project_slug, cluster_name)