function realisticEnvOptions(projectRoot) {
  return {
    cwd: projectRoot,
    env: { ...process.env, INIT_CWD: projectRoot },
    encoding: 'utf-8',
    shell: true, // required for running .cmd on Windows https://nodejs.org/en/blog/vulnerability/april-2024-security-releases-2  https://github.com/nodejs/node/issues/52554
  }
}
@param {string} projectRoot
@returns {import('node:child_process').SpawnSyncOptions}