Fix bug introduced in faaa8c17ca08d22563ab0153b7f964d937f269bf.

diff --git a/launcher b/launcher
index d45b713..5fb068a 100755
--- a/launcher
+++ b/launcher
@@ -337,7 +337,7 @@ set_template_info() {
         p e
        end
     end
-    puts env.map{|k,v| "-e\n#{k}=#{v}" }.join("\n")
+    puts env.map{|k,v| "-e #{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[@]}]=$(echo "$i" | sed s/{{config}}/${config}/g)
       fi
     done <<< "$raw"

GitHub sha: 7a092241

1 Like

You can use the <<< operator in bash to avoid these problems in the future:

env[${#env[@]}]="$(sed 's/{{config}}/${config}/g' <<< "${i}")"

or without forking:

env[${#env[@]}]="${i//\{\{config\}\}/${config}}"
2 Likes

Fix extra spaces appearing in ENV.

:+1: