Skip to content

Commit

Permalink
[364] Update question and some refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
zipofar committed Dec 14, 2023
1 parent 8bef3ba commit 6b34808
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/uffizzi/cli/cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def handle_delete_command(command_args)
end

def handle_delete_dev_cluster(cluster_name)
question = 'You delete dev cluster. Continue?'
question = 'You are about to delete the dev cluster. Do you wish to proceed?'
return unless Uffizzi.prompt.yes?(question)

ClusterDeleteService.delete(cluster_name, cluster_api_connection_params)
Expand Down
4 changes: 2 additions & 2 deletions lib/uffizzi/cli/dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def handle_start_command(command_args)
DevService.check_skaffold_config_existence(config_path)
dev_cluster = DevService.account_user_project_dev_cluster(server, account_id, project_slug)

if try_to_start_second_dev_env?(dev_cluster)
if try_to_start_dev_env_for_existed_cluster?(dev_cluster)
msg = 'Dev cluster already exists. ' \
"Before you create a new dev cluster, you must delete the existing one: $ uffizzi cluster delete #{dev_cluster[:name]}"
Uffizzi.ui.say_error_and_exit(msg)
Expand Down Expand Up @@ -214,7 +214,7 @@ def dev_cluster_already_deleted?(dev_cluster)
DevService.dev_environment_exist? && dev_cluster.blank?
end

def try_to_start_second_dev_env?(dev_cluster)
def try_to_start_dev_env_for_existed_cluster?(dev_cluster)
!DevService.dev_environment_exist? && dev_cluster.present?
end

Expand Down

0 comments on commit 6b34808

Please sign in to comment.