From 76fdcf50adcceedb74d7d71ffed6aa2840824195 Mon Sep 17 00:00:00 2001 From: Jan Schmitt Date: Thu, 1 Aug 2024 21:43:27 +0200 Subject: [PATCH] fix: remove trailing whitespace from awk command * trailing whitespaces break configs that use quotation marks around vars. See https://github.com/nginxinc/docker-nginx-unprivileged/issues/234 --- entrypoint/15-local-resolvers.envsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint/15-local-resolvers.envsh b/entrypoint/15-local-resolvers.envsh index 450a999f..e475e20c 100755 --- a/entrypoint/15-local-resolvers.envsh +++ b/entrypoint/15-local-resolvers.envsh @@ -8,5 +8,5 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin [ "${NGINX_ENTRYPOINT_LOCAL_RESOLVERS:-}" ] || return 0 -NGINX_LOCAL_RESOLVERS=$(awk 'BEGIN{ORS=" "} $1=="nameserver" {if ($2 ~ ":") {print "["$2"]"} else {print $2}}' /etc/resolv.conf) +NGINX_LOCAL_RESOLVERS=$(awk 'BEGIN{ORS=""} $1=="nameserver" {if ($2 ~ ":") {print "["$2"]"} else {print $2}}' /etc/resolv.conf) export NGINX_LOCAL_RESOLVERS