Skip to content

Commit

Permalink
feat: show warning on ff & wk if devtools was given (#1463)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mxschmitt committed Mar 24, 2020
1 parent a2ee7a1 commit 4b1fa2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/firefox.ts
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion src/server/webkit.ts
Expand Up @@ -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');
Expand Down

0 comments on commit 4b1fa2f

Please sign in to comment.