From 4b1fa2f2f9043cb2c4986a7e6141e9957d77a843 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 24 Mar 2020 22:42:20 +0100 Subject: [PATCH] feat: show warning on ff & wk if devtools was given (#1463) Show just a warning instead of preventing the launch on Firefox and WebKit to minimize the error rate / entry barrier. Not fully sure if `console.warn` is okay for that. Closes #1440 --- src/server/firefox.ts | 2 +- src/server/webkit.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/firefox.ts b/src/server/firefox.ts index d61cd4fad0..fc4883a830 100644 --- a/src/server/firefox.ts +++ b/src/server/firefox.ts @@ -158,7 +158,7 @@ export class Firefox implements BrowserType { args = [], } = options; if (devtools) - throw new Error('Option "devtools" is not supported by Firefox'); + console.warn('devtools parameter is not supported as a launch argument in Firefox. You can launch the devtools window manually.'); const userDataDirArg = args.find(arg => arg.startsWith('-profile') || arg.startsWith('--profile')); if (userDataDirArg) throw new Error('Pass userDataDir parameter instead of specifying -profile argument'); diff --git a/src/server/webkit.ts b/src/server/webkit.ts index 3b524b63f1..5dc8fa6c15 100644 --- a/src/server/webkit.ts +++ b/src/server/webkit.ts @@ -144,7 +144,7 @@ export class WebKit implements BrowserType { args = [], } = options; if (devtools) - throw new Error('Option "devtools" is not supported by WebKit'); + console.warn('devtools parameter as a launch argument in WebKit is not supported. Also starting Web Inspector manually will terminate the execution in WebKit.'); const userDataDirArg = args.find(arg => arg.startsWith('--user-data-dir=')); if (userDataDirArg) throw new Error('Pass userDataDir parameter instead of specifying --user-data-dir argument');