From 4a7237a34df3b21bc8db533fedcf1b7ce0269997 Mon Sep 17 00:00:00 2001 From: DaYea Yim Date: Tue, 29 Oct 2019 07:41:33 +0000 Subject: [PATCH] Replaced $(...) instead of legacy backticked `...` Backtick command substitution `...` is legacy syntax with several issues. 1. It has a series of undefined behaviors related to quoting in POSIX. 2. It imposes a custom escaping mode with surprising results. 3. It's exceptionally hard to nest. $(...) command substitution has none of these problems, and is therefore strongly encouraged. --- docker/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f256c7f16..ba33f29c1 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -20,7 +20,7 @@ function setEnvironmentVariable() { } # Grep for variables that look like MySQL (APP_) -for _curVar in `env | grep _APP_ | awk -F = '{print $1}'`;do +for _curVar in $(env | grep _APP_ | awk -F = '{print $1}');do # awk has split them by the equals sign # Pass the name and value to our function setEnvironmentVariable ${_curVar} ${!_curVar} @@ -30,4 +30,4 @@ echo newrelic.license = \"$_APP_NEWRELIC_KEY\" > /etc/php/7.3/fpm/conf.d/newreli echo newrelic.license = \"$_APP_NEWRELIC_KEY\" > /etc/php/7.3/cli/conf.d/newrelic.ini # Start supervisord and services -/usr/bin/supervisord -n -c /etc/supervisord.conf \ No newline at end of file +/usr/bin/supervisord -n -c /etc/supervisord.conf