title: How to interact with stdout.pipe(process.stdout) NodeJS
body: <p>Can someone help me with this?
  I'm trying to spawn a process and interact with it.</p>
  <pre class="lang-js prettyprint-override"><code>const { spawn } = require('child_process')
  
  function runTask(params) {
    const task = params.split(' ')
    let file = task[0]
    if (file === 'npm') {
      file = process.platform === 'win32' ? 'npm.cmd' : file
    }
    const data = spawn(file, task.slice(1))
    data.stdout.pipe(process.stdout, { end: false })
  }
  
  runTask('npm init vite testingvite')
  </code></pre>
  <p>It did show me the stdout, but I can't interact with it.</p>
  <p>Is it even possible to do this?</p>
  <p>OS: Windows10, Node: 12, NPM: 6</p>