1+ diff --git a/lib/cjs/fileUtil.js b/lib/cjs/fileUtil.js
2+ index 700e20961b85b567e426b6b154d67c8517f8c3b4..1fc76e7fb418fc18913df94dd6b6c280a49740ff 100644
3+ --- a/lib/cjs/fileUtil.js
4+ +++ b/lib/cjs/fileUtil.js
5+ @@ -58,8 +58,11 @@ async function unpackArchive(archivePath, folderPath) {
6+ folderPath = path.resolve(process.cwd(), folderPath);
7+ }
8+ if (archivePath.endsWith('.zip')) {
9+ + console.log('unpackArchive 1', archivePath);
10+ const extractZip = await import('extract-zip');
11+ + console.log('unpackArchive 2', archivePath, typeof extractZip);
12+ await extractZip.default(archivePath, { dir: folderPath });
13+ + console.log('unpackArchive 3', archivePath);
14+ }
15+ else if (archivePath.endsWith('.tar.bz2')) {
16+ await extractTar(archivePath, folderPath, 'bzip2');
117diff --git a/lib/cjs/install.js b/lib/cjs/install.js
2- index 35c7229df92528c119d5836d9c863a7de01f0977..f024f869e98845ff70199a1809e1cb8fafc8d3ac 100644
18+ index 35c7229df92528c119d5836d9c863a7de01f0977..43d87d400a4b878a7fb0bff84a5b60ef90fb81b4 100644
319--- a/lib/cjs/install.js
420+++ b/lib/cjs/install.js
521@@ -140,10 +140,12 @@ async function installUrl(url, options) {
@@ -23,15 +39,20 @@ index 35c7229df92528c119d5836d9c863a7de01f0977..f024f869e98845ff70199a1809e1cb8f
2339 try {
2440 if ((0, node_fs_1.existsSync)(outputPath)) {
2541 const installedBrowser = new Cache_js_1.InstalledBrowser(cache, options.browser, options.buildId, options.platform);
26- @@ -178,6 +181,7 @@ async function installUrl(url, options) {
42+ @@ -178,20 +181,27 @@ async function installUrl(url, options) {
2743 finally {
2844 debugTimeEnd('download');
2945 }
3046+ console.log('installUrl', options.browser, `Installing ${archivePath} to ${outputPath}`);
3147 debugInstall(`Installing ${archivePath} to ${outputPath}`);
3248 try {
3349 debugTime('extract');
34- @@ -186,12 +190,14 @@ async function installUrl(url, options) {
50+ await (0, fileUtil_js_1.unpackArchive)(archivePath, outputPath);
51+ }
52+ + catch (err) {
53+ + console.log(err);
54+ + throw err;
55+ + }
3556 finally {
3657 debugTimeEnd('extract');
3758 }
0 commit comments