Skip to content

Commit 2eb238d

Browse files
revert while style
1 parent 3a0fdfd commit 2eb238d

File tree

3 files changed

+45
-42
lines changed

3 files changed

+45
-42
lines changed

layers/console/bootstrap.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ if [ -z "${RUNTIME_CLASS}" ]; then
88
export RUNTIME_CLASS="Bref\ConsoleRuntime\Main"
99
fi
1010

11-
while true; do
12-
if [ -z "${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" ]; then
13-
# Default behavior
11+
while true
12+
do
13+
if [ -z "${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" ]; then
14+
# Default behavior
1415

15-
# We redirect stderr to stdout so that everything
16-
# written on the output ends up in Cloudwatch automatically
17-
php "/opt/bref/bootstrap.php" 2>&1
18-
else
19-
# A wrapper script is configured
20-
# See https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper
21-
# NOTE: EXPERIMENTAL FEATURE, DO NOT USE!!!
22-
# Note: If you do use it, open an issue or GitHub discussion or Slack thread
23-
# and let us know why it's useful to you, we might turn it into an official feature
24-
"${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" php "/opt/bref/bootstrap.php" 2>&1
25-
fi
16+
# We redirect stderr to stdout so that everything
17+
# written on the output ends up in Cloudwatch automatically
18+
php "/opt/bref/bootstrap.php" 2>&1
19+
else
20+
# A wrapper script is configured
21+
# See https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper
22+
# NOTE: EXPERIMENTAL FEATURE, DO NOT USE!!!
23+
# Note: If you do use it, open an issue or GitHub discussion or Slack thread
24+
# and let us know why it's useful to you, we might turn it into an official feature
25+
"${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" php "/opt/bref/bootstrap.php" 2>&1
26+
fi
2627
done

layers/fpm/bootstrap.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ if [ -z "${RUNTIME_CLASS}" ]; then
88
export RUNTIME_CLASS="Bref\FpmRuntime\Main"
99
fi
1010

11-
while true; do
12-
if [ -z "${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" ]; then
13-
# Default behavior
11+
while true
12+
do
13+
if [ -z "${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" ]; then
14+
# Default behavior
1415

15-
# We redirect stderr to stdout so that everything
16-
# written on the output ends up in Cloudwatch automatically
17-
php "/opt/bref/bootstrap.php" 2>&1
18-
else
19-
# A wrapper script is configured
20-
# See https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper
21-
# NOTE: EXPERIMENTAL FEATURE, DO NOT USE!!!
22-
# Note: If you do use it, open an issue or GitHub discussion or Slack thread
23-
# and let us know why it's useful to you, we might turn it into an official feature
24-
"${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" php "/opt/bref/bootstrap.php" 2>&1
25-
fi
16+
# We redirect stderr to stdout so that everything
17+
# written on the output ends up in Cloudwatch automatically
18+
php "/opt/bref/bootstrap.php" 2>&1
19+
else
20+
# A wrapper script is configured
21+
# See https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper
22+
# NOTE: EXPERIMENTAL FEATURE, DO NOT USE!!!
23+
# Note: If you do use it, open an issue or GitHub discussion or Slack thread
24+
# and let us know why it's useful to you, we might turn it into an official feature
25+
"${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" php "/opt/bref/bootstrap.php" 2>&1
26+
fi
2627
done

layers/function/bootstrap.sh

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ if [ -z "${RUNTIME_CLASS}" ]; then
88
export RUNTIME_CLASS="Bref\FunctionRuntime\Main"
99
fi
1010

11-
while true; do
12-
if [ -z "${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" ]; then
13-
# Default behavior
11+
while true
12+
do
13+
if [ -z "${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" ]; then
14+
# Default behavior
1415

15-
# We redirect stderr to stdout so that everything
16-
# written on the output ends up in Cloudwatch automatically
17-
php "/opt/bref/bootstrap.php" 2>&1
18-
else
19-
# A wrapper script is configured
20-
# See https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper
21-
# NOTE: EXPERIMENTAL FEATURE, DO NOT USE!!!
22-
# Note: If you do use it, open an issue or GitHub discussion or Slack thread
23-
# and let us know why it's useful to you, we might turn it into an official feature
24-
"${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" php "/opt/bref/bootstrap.php" 2>&1
25-
fi
16+
# We redirect stderr to stdout so that everything
17+
# written on the output ends up in Cloudwatch automatically
18+
php "/opt/bref/bootstrap.php" 2>&1
19+
else
20+
# A wrapper script is configured
21+
# See https://docs.aws.amazon.com/lambda/latest/dg/runtimes-modify.html#runtime-wrapper
22+
# NOTE: EXPERIMENTAL FEATURE, DO NOT USE!!!
23+
# Note: If you do use it, open an issue or GitHub discussion or Slack thread
24+
# and let us know why it's useful to you, we might turn it into an official feature
25+
"${EXPERIMENTAL_AWS_LAMBDA_EXEC_WRAPPER}" php "/opt/bref/bootstrap.php" 2>&1
26+
fi
2627
done

0 commit comments

Comments
 (0)