Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions scripts/cli/lec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -538,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
Expand Down Expand Up @@ -674,6 +675,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() {
Expand Down