mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-07-25 13:50:51 +02:00
refactor: pass custom executable path
This commit is contained in:
@@ -158,6 +158,15 @@ export async function runCamoufoxWorker(id: string): Promise<void> {
|
|||||||
env: finalEnv,
|
env: finalEnv,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// If a custom executable path was provided, ensure Playwright uses it
|
||||||
|
if (
|
||||||
|
(camoufoxOptions as any).executable_path &&
|
||||||
|
typeof (camoufoxOptions as any).executable_path === "string"
|
||||||
|
) {
|
||||||
|
finalOptions.executablePath = (camoufoxOptions as any)
|
||||||
|
.executable_path as string;
|
||||||
|
}
|
||||||
|
|
||||||
// Only add proxy if it exists and is valid
|
// Only add proxy if it exists and is valid
|
||||||
if (camoufoxOptions.proxy) {
|
if (camoufoxOptions.proxy) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -243,6 +243,16 @@ program
|
|||||||
",",
|
",",
|
||||||
) as "UBO"[];
|
) as "UBO"[];
|
||||||
|
|
||||||
|
// Executable path: forward through to camoufox-js and ultimately Playwright
|
||||||
|
if (
|
||||||
|
options.executablePath &&
|
||||||
|
typeof options.executablePath === "string"
|
||||||
|
) {
|
||||||
|
// camoufox-js uses snake_case for this option
|
||||||
|
(camoufoxOptions as any).executable_path =
|
||||||
|
options.executablePath as string;
|
||||||
|
}
|
||||||
|
|
||||||
// Screen and window
|
// Screen and window
|
||||||
const screen: {
|
const screen: {
|
||||||
minWidth?: number;
|
minWidth?: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user