Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/interop/clients/js/harness.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @module
*/
import { randomUUID } from "node:crypto";
import { realpathSync } from "node:fs";
import { existsSync, realpathSync } from "node:fs";
import { join } from "node:path";
import {
type Browser,
Expand Down Expand Up @@ -125,7 +125,8 @@ export function launch(args: string[] = [], engine: Engine = "chromium"): Promis
// Only the Nix browser needs Nix's dlopened media libraries. Downloaded Firefox
// uses the system libraries installed by Playwright; mixing in Nix's libraries
// can require a newer glibc than the host's and prevent the audio backend starting.
if (realpathSync(firefox.executablePath()).startsWith("/nix/store/"))
const executable = firefox.executablePath();
if (existsSync(executable) && realpathSync(executable).startsWith("/nix/store/"))
env.LD_LIBRARY_PATH = [process.env.PLAYWRIGHT_FIREFOX_LIBRARY_PATH, process.env.LD_LIBRARY_PATH]
.filter(Boolean)
.join(":");
Expand Down