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

var shadowPnpmBin = require('./shadow-pnpm-bin2.js');

void (async () => {
  process.exitCode = 1;
  const {
    spawnPromise
  } = await shadowPnpmBin.shadowPnpmBin(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=51759390-e500-4f4b-b353-e98475a543bf
//# sourceMappingURL=pnpm-cli.js.map
