mirror of
https://github.com/autistic-symposium/backend-and-orchestration-toolkit.git
synced 2025-06-09 07:22:40 -04:00
Clean up this repo
This commit is contained in:
parent
0d4632e7dd
commit
024892437e
309 changed files with 7 additions and 15 deletions
19
aws/lambda-function/monitoring_example/scripts/validate-env.sh
Executable file
19
aws/lambda-function/monitoring_example/scripts/validate-env.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit # always exit on error
|
||||
set -o errtrace # trap errors in functions as well
|
||||
set -o pipefail # don't ignore exit codes when piping output
|
||||
set -o posix # more strict failures in subshells
|
||||
|
||||
IFS=$'\n\t'
|
||||
|
||||
declare -a missing
|
||||
for var in "$@"; do
|
||||
if [[ -z "${!var}" ]]; then
|
||||
echo "⚠️ ERROR: Missing required environment variable: ${var}" 1>&2
|
||||
missing+=("${var}")
|
||||
fi
|
||||
done
|
||||
if [[ -n "${missing[*]}" ]]; then
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue