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
This commit is contained in:
Max Schmitt 2020-03-24 22:42:20 +01:00 committed by GitHub
parent a2ee7a1f2a
commit 4b1fa2f2f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -158,7 +158,7 @@ export class Firefox implements BrowserType<FFBrowser> {
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');

View file

@ -144,7 +144,7 @@ export class WebKit implements BrowserType<WKBrowser> {
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');