<div class="debug-output">
<% if build[:environment] %>
  <h3 class="block-header">Environment:</h3>
  <% build[:environment].each do |k, v| %>
    <p><strong><%="#{k} = " %></strong><%="#{v}" %></p>
  <% end %>
<% end %>w
<% if build[:priority] %>
  <h3 class="block-header">Priority:</h3>
  <%= build[:priority] %>
<% end %>
<% if build[:command] %>
  <h3 class="block-header">Command:</h3>
  <%= build[:command] %>
<% end %>
<% if build[:callbacks] %>
  <h3 class="block-header">Callbacks:</h3>
  <% build[:callbacks].each do |callback| %>
    <%= callback %>
  <% end %>
<% end %>
</div>

<div class="debug-output">
<% if build[:environment] %>
  <h3 class="block-header">Environment:</h3>
  <% build[:environment].reject{|k, v| v.nil?}.each do |k, v| %>
    <p><strong><%="#{k} = " %></strong><%="#{v}" %></p>
  <% end %>
<% end %>w
<% if build[:priority] %>
  <h3 class="block-header">Priority:</h3>
  <%= build[:priority] %>
<% end %>
<% if build[:command] %>
  <h3 class="block-header">Command:</h3>
  <%= build[:command] %>
<% end %>
<% if build[:callbacks] %>
  <h3 class="block-header">Callbacks:</h3>
  <% build[:callbacks].each do |callback| %>
    <%= callback %>
  <% end %>
<% end %>
</div>

REmove environment variables that won't exist in the subprocess
REmove environment variables that won't exist in the subprocess
