opts.js 369 B

123456789101112
  1. // Values we want to set if they're not already defined by the end user
  2. // This defaults to accepting new ssh host key fingerprints
  3. const gitEnv = {
  4. GIT_ASKPASS: 'echo',
  5. GIT_SSH_COMMAND: 'ssh -oStrictHostKeyChecking=accept-new'
  6. }
  7. module.exports = (opts = {}) => ({
  8. stdioString: true,
  9. ...opts,
  10. shell: false,
  11. env: opts.env || { ...gitEnv, ...process.env }
  12. })