title: Node-Webkit Child Process Exec
body: <p>I want to execute a homebrew command for example </p>
  
  <pre><code>brew list
  </code></pre>
  
  <p>I followed the documentation and executed it like this:</p>
  
  <pre><code>child = exec('brew', function (error, stdout, stderr) {
   console.log(stdout);
   console.log(stderr);
  });
  </code></pre>
  
  <p>I am getting a command not found error, and realized that if I do /usr/local/bin/brew as the command it works. However simply using 'brew' should work as well since I can run 'brew' from the command line just as such.  </p>
  
  <p>Why is this the case and what does it take to make 'brew' run as a child process in node? I have a feeling part of the issue because the command on node-webkit seems to execute from bin/sh.</p>
  
  <p>Thanks</p>