Skip to content

Commit dd1efe2

Browse files
committed
Added check for argument
1 parent a2d4ce4 commit dd1efe2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

scripts/aws-attach-layer-to-lambda-function.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
set -euo pipefail
44

5+
# Check for argument
6+
if [ $# -eq 0 ]
7+
then
8+
SCRIPT_NAME=$(basename "$0")
9+
echo "ERROR: No argument supplied. Please give the name of a Lambda function!"
10+
echo ""
11+
echo "Usage: $SCRIPT_NAME <lambda-function-name>"
12+
echo ""
13+
exit 1
14+
fi
15+
516
FUNCTION_NAME=$1
617

718
echo "Getting ARN of newest Sentry lambda layer..."

0 commit comments

Comments
 (0)