From 6a8f4aa002e3c6c2861e03ac9d3358484c206c7c Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 6 Dec 2020 21:34:14 -0600 Subject: [PATCH] Fixed handling of usernames with spaces in WHITE_LIST_USERS Fixes #116 --- bedrock-entry.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bedrock-entry.sh b/bedrock-entry.sh index 69ce7d0..65f52b4 100755 --- a/bedrock-entry.sh +++ b/bedrock-entry.sh @@ -117,7 +117,7 @@ fi if [ -n "$WHITE_LIST_USERS" ]; then echo "Setting whitelist" rm -rf whitelist.json - echo $WHITE_LIST_USERS | awk -v RS=, 'BEGIN{print "["}; {print "{ \"name\": \"" $1 "\" },"}; END{print "]"}' > whitelist.json + echo "$WHITE_LIST_USERS" | jq -R 'split(",") | map({"name": .})' > whitelist.json # flag whitelist to true so the server properties process correctly export WHITE_LIST=true fi