From 65e2f085ba63741c898da7eb9a5158369f1fe0fc Mon Sep 17 00:00:00 2001 From: Leo Antunes Date: Wed, 31 Jan 2018 11:18:15 +0100 Subject: [PATCH] fix quoting of env vars --- spec/defines/daemon_spec.rb | 4 ++-- templates/daemon.env.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/defines/daemon_spec.rb b/spec/defines/daemon_spec.rb index a4c306a1a..6b85d2b1b 100644 --- a/spec/defines/daemon_spec.rb +++ b/spec/defines/daemon_spec.rb @@ -153,7 +153,7 @@ 'owner' => 'root', 'group' => 'root' ).with_content( - %r{SOMEVAR=42\n} + %r{SOMEVAR="42"\n} ) } elsif ['centos-6-x86_64', 'redhat-6-x86_64', 'centos-7-x86_64', 'redhat-7-x86_64'].include?(os) @@ -163,7 +163,7 @@ 'owner' => 'root', 'group' => 'root' ).with_content( - %r{SOMEVAR=42\n} + %r{SOMEVAR="42"\n} ) } end diff --git a/templates/daemon.env.erb b/templates/daemon.env.erb index 765629503..f15b409bb 100644 --- a/templates/daemon.env.erb +++ b/templates/daemon.env.erb @@ -1,3 +1,3 @@ <% @env_vars.each do |key, value| -%> -<%= key %>=<%= value %> +<%= key %>="<%= value %>" <% end -%> \ No newline at end of file