<% @environments.keys.each do |k| -%>
<% if @environments[k] == '::undef' -%>
rm /files<%= @confdir -%>/spark-env.sh/<%= k -%>
<% else -%>
set /files<%= @confdir -%>/spark-env.sh/<%= k -%> <%= @environments[k] %>
set /files<%= @confdir -%>/spark-env.sh/<%= k -%>/export ""
<% end -%>
<% end -%>

<% @environments.keys.each do |k| -%>
<% if @environments[k] == '::undef' -%>
rm /files<%= @confdir -%>/spark-env.sh/<%= k %>
<% else -%>
set /files<%= @confdir -%>/spark-env.sh/<%= k -%> <%= @environments[k] %>
set /files<%= @confdir -%>/spark-env.sh/<%= k -%>/export ""
<% end -%>
<% end -%>

Fix a problem when deleting multiple variables.
Fix a problem when deleting multiple variables.
