Skip to content

Commit 7616feb

Browse files
authored
Improve case-insensitive comparison in Bootstrap script (#45)
1 parent 0da9550 commit 7616feb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/boot.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
#!/bin/bash
22
args=("$@")
3+
4+
# lowercase DD_LOG_LEVEL
5+
DD_LOG_LEVEL=$(echo "$DD_LOG_LEVEL" | tr '[:upper:]' '[:lower:]')
6+
37
if [ "$DD_EXPERIMENTAL_ENABLE_PROXY" == "true" ]
48
then
5-
if [ grep -ix "$DD_LOG_LEVEL" <<< "debug" ]
9+
if [ "$DD_LOG_LEVEL" == "debug" ]
610
then
711
echo "[bootstrap] DD_EXPERIMENTAL_ENABLE_PROXY is true"
812
echo "[bootstrap] original AWS_LAMBDA_RUNTIME_API value is $AWS_LAMBDA_RUNTIME_API"
913
fi
1014

1115
export AWS_LAMBDA_RUNTIME_API="127.0.0.1:9000"
1216

13-
if [ grep -ix "$DD_LOG_LEVEL" <<< "debug" ]
17+
if [ "$DD_LOG_LEVEL" == "debug" ]
1418
then
1519
echo "[bootstrap] rerouting AWS_LAMBDA_RUNTIME_API to $AWS_LAMBDA_RUNTIME_API"
1620
fi

0 commit comments

Comments
 (0)