sanjana2505006 commented on code in PR #15584:
URL: https://github.com/apache/grails-core/pull/15584#discussion_r3105774305
##########
.github/scripts/releaseDistributions.sh:
##########
@@ -61,9 +61,14 @@ svn_exists() {
old_release_folder="$(svn ls "${svn_flags[@]}" "${RELEASE_ROOT}" | awk -F/
'NF{print $1; exit}')"
if [[ -n "${old_release_folder}" ]]; then
PRIOR_RELEASE_URL="${RELEASE_ROOT}/${old_release_folder}"
- echo "🗑️ Deleting old release folder: ${PRIOR_RELEASE_URL}"
- svn rm "${svn_flags[@]}" -m "Remove previous release ${old_release_folder}"
"${PRIOR_RELEASE_URL}"
- echo "✅ Deleted old release folder"
+ read -r -p "Remove old release folder '${old_release_folder}' at
${PRIOR_RELEASE_URL}? [y/N] " confirm
Review Comment:
Since the script already reads a password from stdin, there's a risk that
this second read call will consume unintended data if the script is run in a
way that redirects stdin.
To be safe, we should probably use `read ... < /dev/tty` for this
confirmation prompt to ensure it always interacts with the terminal.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]