title: build.gradle - Configure Eclipse so that System.getenv('PATH') returns the same value as from command line in macOS
body: <p>The environment:</p>
  <ul>
  <li>macOS 10.15.7</li>
  <li>Gradle 6.8.2</li>
  <li>Eclipse Version: 2020-12 (4.18.0)</li>
  </ul>
  <p>The problem:</p>
  <p>I have a very simple Gradle build script that works from the command line but fails when running within Eclipse.
  I have boiled it down to the fact that System.getenv('PATH') returns 2 different values depending on gradle being run from command line or from eclipse
  I have created a very simple gradle build that only contains:</p>
  <pre><code> tasks.register('debug') {
   doLast {
       println System.getenv('PATH')
   }
  </code></pre>
  <p>}</p>
  <p>If I run the task from Eclipse, the output is:</p>
  <pre><code>&gt; Task :debug
  /usr/bin:/bin:/usr/sbin:/sbin
  </code></pre>
  <p>If I run the tasks from the macOS command line the output is:</p>
  <pre><code>&gt; Task :debug
  /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/opt/ImageMagick/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin
  </code></pre>
  <p>It is clear that Eclipse somehow does not have access to the same PATH as my command line.</p>
  <p>So my questions are:</p>
  <ol>
  <li>Can I force Eclipse to have access to the same PATH environment variable as my command line</li>
  <li>Can I configure Eclipse to add custom entries to the PATH environment variable</li>
  <li>Can I configure my Gradle run configuration in Eclipse to add custom entries to the PATH environment variable</li>
  <li>Can I configure Gradle, in general, to add custom entries to the PATH environment variable</li>
  </ol>
  <p>Thanks</p>