title: Query npm error state in bat file
body: <p>We're currently moving the build of our UI projects (3 in total) to Grunt. To ease the transition I'd like to provide a bat file that will run <code>npm install</code> for each project, however I'd like to know if something went wrong when issuing this command. It's merely sugar coating that I'm after, I know npm echoes errors out, but I'd like some easier messages for the members on my team that are not familiar with <code>npm</code> and <code>node</code>.</p>
  
  <p><strong>Is there a way to check whether npm has run into an error and to subsequently halt the bat file?</strong> For example, if node is not installed, I simply check for <code>%ERRORLEVEL%</code> to be 1. If this is the case, I echo out some instructions and exit the execution. The problem I'm having is that <code>%ERRORLEVEL%</code> is not set to 1 when an error occurs during a <code>npm install</code>.</p>
  
  <p>Any help appreciated!</p>