#!/usr/bin/env node
'use strict';

var shadowYarnBin = require('./shadow-yarn-bin.js');

void (async () => {
  process.exitCode = 1;
  const {
    spawnPromise
  } = await shadowYarnBin(process.argv.slice(2), {
    stdio: 'inherit'
  });

  // See https://nodejs.org/api/child_process.html#event-exit.
  spawnPromise.process.on('exit', (code, signalName) => {
    if (signalName) {
      process.kill(process.pid, signalName);
    } else if (typeof code === 'number') {
      // eslint-disable-next-line n/no-process-exit
      process.exit(code);
    }
  });
  await spawnPromise;
})();
//# debugId=822e2131-e205-431a-9492-44b21b68841d
//# sourceMappingURL=yarn-cli.js.map
