Skip to content

Commit 54ff957

Browse files
committed
test
1 parent 554b457 commit 54ff957

3 files changed

Lines changed: 29 additions & 7 deletions

File tree

.github/actions/build-and-test/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ runs:
3131
PUPPETEER_CHROME_SKIP_DOWNLOAD: false
3232
PUPPETEER_FIREFOX_SKIP_DOWNLOAD: false
3333
PUPPETEER_CHROME_HEADLESS_SHELL_SKIP_DOWNLOAD: false
34+
DEBUG: *
3435
run: npx puppeteer browsers install
3536
- name: Install Edge
3637
id: install-edge

patches/@puppeteer__browsers.patch

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
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');
117
diff --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
}

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)