Skip to content

Commit

Permalink
[339] fix handling of missing current cluster config
Browse files Browse the repository at this point in the history
  • Loading branch information
moklidia committed Oct 9, 2023
1 parent 943ba8c commit c6437ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/uffizzi/cli/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c6437ca

Please sign in to comment.