From 891d0673f6fe404c461c8729226c88cde5ad7506 Mon Sep 17 00:00:00 2001 From: Drew Brokke Date: Wed, 29 Oct 2025 13:32:52 -0500 Subject: [PATCH 1/2] LPD-67151 allows running _removeWorktree without confirmation --- scripts/cli/lec.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/cli/lec.sh b/scripts/cli/lec.sh index 60c43c6..bfc6823 100755 --- a/scripts/cli/lec.sh +++ b/scripts/cli/lec.sh @@ -373,10 +373,6 @@ _removeWorktree() { local worktree_name="${worktree##*/}" - if ! _confirm "Are you sure you want to remove the project ${C_YELLOW}${worktree_name}${C_NC}? The project directory and all data will be removed."; then - return - fi - _print_step "Shutting down project and removing Docker volumes..." ( cd "${worktree}" || exit 1 @@ -674,6 +670,10 @@ cmd_remove() { worktree="$(_listWorktrees | _select "Choose a project to remove")" _cancelIfEmpty "${worktree}" + if ! _confirm "Are you sure you want to remove the project ${C_YELLOW}${worktree_name}${C_NC}? The project directory and all data will be removed."; then + return + fi + _removeWorktree "${worktree}" } cmd_share() { From aebbe2e7c6067e4c0d25212573179fd6ab9a08e9 Mon Sep 17 00:00:00 2001 From: Drew Brokke Date: Wed, 29 Oct 2025 13:33:32 -0500 Subject: [PATCH 2/2] LPD-67151 confirm removal once for all selected projects --- scripts/cli/lec.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/cli/lec.sh b/scripts/cli/lec.sh index bfc6823..f8a29cd 100755 --- a/scripts/cli/lec.sh +++ b/scripts/cli/lec.sh @@ -534,7 +534,12 @@ _cmd_remove2() { worktrees="$(_listWorktrees | grep -E -v "^${LIFERAY_ENVIRONMENT_COMPOSER_HOME}$" | _selectMultiple "Choose projects to remove (Tab to select multiple)")" _cancelIfEmpty "${worktrees}" + printf "${C_BOLD}Projects to be removed:\n\n${C_YELLOW}%s${C_RESET}\n\n" "${worktrees}" + + _confirm "Are you sure you want to remove them? This cannot be undone." + for worktree in ${worktrees}; do + _print_step "Removing project ${C_YELLOW}${worktree}${C_NC}" _removeWorktree "${worktree}" echo done