We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32c35d6 commit 705e6ecCopy full SHA for 705e6ec
MerlinAU.sh
@@ -318,8 +318,8 @@ _WaitForYESorNO_()
318
local retCode defltAnswer promptStr
319
320
if [ $# -gt 0 ] && [ "$1" = "NO" ]
321
- then retCode=1 ; defltAnswer="NO"
322
- else retCode=0 ; defltAnswer="YES"
+ then retCode=1 ; defltAnswer="YES"
+ else retCode=0 ; defltAnswer="NO"
323
fi
324
325
! "$isInteractive" && return "$retCode"
@@ -331,6 +331,7 @@ _WaitForYESorNO_()
331
332
333
printf "$promptStr" ; read -r YESorNO
334
+ [ -z "$YESorNO" ] && YESorNO="$defltAnswer"
335
if echo "$YESorNO" | grep -qE "^([Yy](es)?|YES)$"
336
then echo "OK" ; return 0
337
else echo "NO" ; return 1
0 commit comments