From 90ff596a5689221f25f700594f5f9ef97e61e509 Mon Sep 17 00:00:00 2001 From: Sebastien Stormacq Date: Sun, 2 Nov 2025 22:07:47 +0100 Subject: [PATCH] fix shell check --- .../_MyFirstFunction/create_and_deploy_function.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Examples/_MyFirstFunction/create_and_deploy_function.sh b/Examples/_MyFirstFunction/create_and_deploy_function.sh index fe3ae57d..f7dc90c4 100755 --- a/Examples/_MyFirstFunction/create_and_deploy_function.sh +++ b/Examples/_MyFirstFunction/create_and_deploy_function.sh @@ -31,11 +31,12 @@ check_prerequisites() { These values are read from '~/.aws/credentials'. " - read -r -p "Are you ready to create your first Lambda function in Swift? [y/n] " continue - if [[ ! $continue =~ ^[Yy]$ ]]; then - echo "OK, try again later when you feel ready" - exit 1 - fi + printf "Are you ready to create your first Lambda function in Swift? [y/n] " + read -r continue + case $continue in + [Yy]*) ;; + *) echo "OK, try again later when you feel ready"; exit 1 ;; + esac } create_lambda_execution_role() {