Skip to content

Commit aa664ca

Browse files
committed
fix: remove trailing whitespace from awk output
* trailing whitespaces break configs that use quotation marks around vars. See nginx/docker-nginx-unprivileged#234
1 parent a6f7d14 commit aa664ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entrypoint/15-local-resolvers.envsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
88

99
[ "${NGINX_ENTRYPOINT_LOCAL_RESOLVERS:-}" ] || return 0
1010

11-
NGINX_LOCAL_RESOLVERS=$(awk 'BEGIN{ORS=" "} $1=="nameserver" {if ($2 ~ ":") {print "["$2"]"} else {print $2}}' /etc/resolv.conf)
11+
NGINX_LOCAL_RESOLVERS=$(awk 'BEGIN{ORS=" "} $1=="nameserver" {if ($2 ~ ":") {print "["$2"]"} else {print $2}}' /etc/resolv.conf | xargs)
1212
export NGINX_LOCAL_RESOLVERS

0 commit comments

Comments
 (0)