title: cwd doesn't execute on the current working directory
body: <p>In my understanding from <a href="https://stackoverflow.com/a/44667294/3416774">How to run shell script file using nodejs?</a>, this code should give me the current directory of the js file:</p>
  <pre class="lang-js prettyprint-override"><code>exec('dir', {cwd: &quot;.&quot; }, (error, stdout, stderr) =&gt; {
              console.log(stdout);
              console.log(stderr);
              if (error !== null) {
                  console.log(`exec error: ${error}`);
              }
          }); 
  </code></pre>
  <p>But the result is another directory. How to fix this? I'm on Windows 11 Home, and use <a href="https://esbuild.github.io/" rel="nofollow noreferrer" title="esbuild - An extremely fast JavaScript bundler">esbuild</a> to bundle ts to js.</p>