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

var shadowNpmBin = require('./shadow-npm-bin2.js');

void (async () => {
  process.exitCode = 1;
  const {
    spawnPromise
  } = await shadowNpmBin.shadowNpmBin(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=6b20bb60-c89d-4ff1-b9a7-42dde7e901ca
//# sourceMappingURL=npm-cli.js.map
