You cannot say no to encryption due to missing No ) Statement #125

Closed
opened 2019-10-12 09:19:10 +02:00 by ghost · 1 comment
ghost commented 2019-10-12 09:19:10 +02:00 (Migrated from github.com)

SolidHal/PrawnOS@c80f515d9a/scripts/InstallScripts/InstallToInternal.sh (L89-L103)

fixed it with:

    case $yn in
    Yes ) ....
    No )
    	break
    	;;
    * )
        echo "Invalid Option, please enter Yes or No, 1 or 2"
        ;;

which works for every case, invalid input, 1 and 2.

https://github.com/SolidHal/PrawnOS/blob/c80f515d9a269fb7b04b115fb1643c420a6b7bee/scripts/InstallScripts/InstallToInternal.sh#L89-L103 fixed it with: case $yn in Yes ) .... No ) break ;; * ) echo "Invalid Option, please enter Yes or No, 1 or 2" ;; which works for every case, invalid input, 1 and 2.
SolidEva commented 2019-10-12 20:43:36 +02:00 (Migrated from github.com)

Good catch, I tested lots of user input for enabling encryption but none for not!
The reason for the odd

case $yn,$REPLY in 
Yes,*|*,Yes ) 

syntax instead of just

case $yn in 
Yes ) 

Is to enable accepting 1 or Yes and 2 or No, otherwise you can only input 1 and 2 which I didn't think was very user friendly.

Good catch, I tested lots of user input for enabling encryption but none for not! The reason for the odd ``` case $yn,$REPLY in Yes,*|*,Yes ) ``` syntax instead of just ``` case $yn in Yes ) ``` Is to enable accepting 1 or Yes and 2 or No, otherwise you can only input 1 and 2 which I didn't think was very user friendly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ev4/PrawnOS#125
No description provided.