master
John Lauer v2.0.398 (insiders): Chrome for Testing unpack could hang forever in puppeteer's in-process extract-zip (arav-rog: 3 fi… e26557d 2mo ago
// pup-bridge unpack worker (v2.0.398): `node unpack.js <archive.zip> <destDir>`.
// Runs OUT of the bridge process so a hung unzip can be killed by the watchdog in chrome.js
// (measured on arav-rog 2026-09-05: puppeteer's in-process extract-zip stalled forever at the
// third file of a fully downloaded, valid Chrome-for-Testing archive, with the bridge idle).
// Windows and macOS use the OS tar first; this worker is the fallback / Linux path.
const path = require('path');
const [, , archive, dest] = process.argv;
if (!archive || !dest) { console.error('usage: node unpack.js <archive.zip> <destDir>'); process.exit(64); }
require('extract-zip')(archive, { dir: path.resolve(dest) })
  .then(() => process.exit(0), (e) => { console.error(e && e.stack || String(e)); process.exit(2); });