Skip to content

Commit 90ff596

Browse files
committed
fix shell check
1 parent 174c967 commit 90ff596

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Examples/_MyFirstFunction/create_and_deploy_function.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ check_prerequisites() {
3131
These values are read from '~/.aws/credentials'.
3232
"
3333

34-
read -r -p "Are you ready to create your first Lambda function in Swift? [y/n] " continue
35-
if [[ ! $continue =~ ^[Yy]$ ]]; then
36-
echo "OK, try again later when you feel ready"
37-
exit 1
38-
fi
34+
printf "Are you ready to create your first Lambda function in Swift? [y/n] "
35+
read -r continue
36+
case $continue in
37+
[Yy]*) ;;
38+
*) echo "OK, try again later when you feel ready"; exit 1 ;;
39+
esac
3940
}
4041

4142
create_lambda_execution_role() {

0 commit comments

Comments
 (0)