chromedriver 418 B

12345678910111213
  1. #!/usr/bin/env node
  2. const path = require("path");
  3. const spawn = require("child_process").spawn;
  4. const binPath = require(path.join(__dirname, "..", "lib", "chromedriver")).path;
  5. const args = process.argv.slice(2);
  6. const cp = spawn(binPath, args);
  7. cp.stdout.pipe(process.stdout);
  8. cp.stderr.pipe(process.stderr);
  9. cp.on("exit", process.exit);
  10. process.on("SIGTERM", function() {
  11. cp.kill("SIGTERM");
  12. process.exit(1);
  13. });