File tree Expand file tree Collapse file tree 5 files changed +20
-6
lines changed
vendor/puppeteer-core/puppeteer Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -14,19 +14,20 @@ jobs:
1414 strategy:
1515 matrix:
1616 deno: ["v1.x", "nightly"]
17- os: [macOS-latest, windows-latest, ubuntu-latest]
17+ os: [windows-latest, ubuntu-latest] # Can't run on macOS because headless isn't working there.
18+ fail-fast: false
1819
1920 steps:
2021 - name: Setup repo
2122 uses: actions/checkout@v2
2223
2324 - name: Setup Deno
24- uses: denolib/setup-deno@v2.3
25+ uses: denolib/setup-deno@v2.3.0
2526 with:
2627 deno-version: ${{ matrix.deno }}
2728
2829 - name: Cache Dependencies
29- run: deno cache mod.ts
30+ run: deno cache --unstable mod.ts
3031
3132 - name: Install Chromium
3233 run: deno run -A --unstable install.ts
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ function browserTest(
1111 Deno.test(name, async () => {
1212 let browser: Browser | undefined = undefined;
1313 try {
14- browser = await puppeteer.launch();
14+ browser = await puppeteer.launch({
15+ headless: true,
16+ });
1517 await fn(browser);
1618 } finally {
1719 if (browser) await browser.close();
Original file line number Diff line number Diff line change @@ -13,7 +13,11 @@ export class BrowserWebSocketTransport {
1313 }
1414 });
1515 // Silently ignore all errors - we don't know what to do with them.
16- this._ws.addEventListener("error", () => {});
16+ this._ws.addEventListener(
17+ "error",
18+ () => {},
19+ // (err) => console.log("BrowserWebSocketTransport error:", err),
20+ );
1721 this.onmessage = null;
1822 this.onclose = null;
1923 }
Original file line number Diff line number Diff line change @@ -286,7 +286,8 @@ export class BrowserFetcher {
286286 await Deno.remove(archivePath, { recursive: true });
287287 }
288288 const revisionInfo = this.revisionInfo(revision);
289- if (revisionInfo) await Deno.chmod(revisionInfo.executablePath, 0o755);
289+ if (revisionInfo && Deno.build.os !== "windows")
290+ await Deno.chmod(revisionInfo.executablePath, 0o755);
290291 return revisionInfo;
291292 }
292293
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ export class BrowserRunner {
7070 this._closed = true;
7171 try {
7272 if (this.proc) {
73+ if (!status.success) {
74+ await Deno.copy(this.proc.stdout!, Deno.stdout);
75+ await Deno.copy(this.proc.stderr!, Deno.stderr);
76+ }
7377 this.proc.stdin!.close();
7478 this.proc.stdout!.close();
7579 this.proc.stderr!.close();
@@ -141,6 +145,8 @@ export class BrowserRunner {
141145 timeout,
142146 preferredRevision
143147 );
148+ Deno.copy(this.proc!.stdout!, Deno.stdout);
149+ Deno.copy(this.proc!.stderr!, Deno.stderr);
144150 const transport = await BrowserWebSocketTransport.create(browserWSEndpoint);
145151 this.connection = new Connection(browserWSEndpoint, transport, slowMo);
146152 return this.connection;
You can’t perform that action at this time.
0 commit comments