-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
confirm:
cmd: |
if [ -z "${AHOY_CONFIRM_RESPONSE}" ]; then
read -r -p "$( echo -e "\033[31m>> $1\033[0m \033[2m[y/N]\033[0m " )" AHOY_CONFIRM_RESPONSE
if [ "${AHOY_CONFIRM_RESPONSE}" != "y" ] && [ "${AHOY_CONFIRM_RESPONSE}" != "true" ]; then
echo "The operation was canceled."
exit 1
fi
else
if [ "${AHOY_CONFIRM_WAIT_SKIP}" != "1" ]; then
echo -e "\033[31m>> $1\033[0m \033[2m[y/N] ${AHOY_CONFIRM_RESPONSE}\033[0m"
echo "Waiting for 3 seconds... Press Ctrl+C to cancel."
sleep 3
fi
fi
hide: true
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Released in 1.37.0