title: How to start an interactive terminal window on mac using child_process library of node?
body: <p>I want to execute a bash command - <code>dotnet dev-certs https --trust</code> in an interactive terminal through <code>child_process</code> library.
  Since it asks for the user password, it has to be interactive terminal.</p>
  
  <p>I've already tried using AppleScript for it, but the user experience is subpar since it tends to leave half-closed terminal windows around.</p>
  
  <p>Edit - Added the code snippet that I am using to create a child_process.</p>
  
  <pre><code>import * as cp from 'child_process'
  cp.spawn('dotnet dev-certs https --trust', {})
  </code></pre>
  
  <p>I've tried many many combinations of <code>cp.spawn</code> and <code>cp.exec</code>.
  e.g. <code>cp.spawn('...', { shell: true, stdio: 'ignore', detached: true })</code> etc.</p>
  
  <p><code>cp.spawn</code> actually creates a process, but it's not interactive and immediately terminates. </p>