From: Guo Xiang Tan Date: Wed, 23 Jan 2019 05:49:06 +0000 (+0800) Subject: Fix extra spaces appearing in ENV. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0138494b64b1065c075e6d9e9f8408cd61620335;p=discourse_docker.git Fix extra spaces appearing in ENV. 7a092241d1ee2b515a652ad71a134162a6f05cde --- diff --git a/launcher b/launcher index 5fb068a..f68e42b 100755 --- a/launcher +++ b/launcher @@ -337,7 +337,7 @@ set_template_info() { p e end end - puts env.map{|k,v| "-e #{k}=#{v}" }.join("\n") + puts env.map{|k,v| "-e\n#{k}=#{v}" }.join("\n") RUBY tmp_input_file=$(mktemp) @@ -353,7 +353,7 @@ RUBY if [ "$i" == "*ERROR." ]; then ok=0 elif [ -n "$i" ]; then - env[${#env[@]}]=$(echo "$i" | sed s/{{config}}/${config}/g) + env[${#env[@]}]="${i//\{\{config\}\}/${config}}" fi done <<< "$raw"