title: Chef recipe compilation failure
body: <p>I am trying to create a chef recipe which depends on <code>tomcat</code> cookbook such as</p>
  
  <pre><code>tomcat_user = node[:tomcat][:user]
  tomcat_user_home_folder = node[:etc][:passwd][tomcat_user][:dir]
  execute "Install jasper license" do
      command "cp jasperserver.license #{tomcat_user_home_folder}/"
      cwd "#{node["install-jasper-license"]["license-location"]}"
  end
  </code></pre>
  
  <p>When I run <code>sudo chef-client</code> on a node, I get the following error:</p>
  
  <pre><code>================================================================================
  Recipe Compile Error in /var/chef/cache/cookbooks/install-jasper-license/recipes/default.rb
  ================================================================================
  
  NoMethodError
  -------------
  undefined method `[]' for nil:NilClass
  </code></pre>
  
  <p>In my opinion this recipe is unable to find <code>node[:etc][:passwd][tomcat_user]</code>. A tomcat user will be installed when tomcat recipe runs. I have also added <code>depends 'tomcat'</code> in metadata.rb of this cookbook. My intent here is to install a file at the home location of the user running tomcat. How do I go about it?</p>