fix(launcher): do not add --disable-gpu on OSX and Linux (#2908)

This patch conditionally adds the `--disable-gpu` flag if only we
run headless on windows.

Fixes #1260.
This commit is contained in:
Andrey Lushnikov 2018-07-19 10:19:08 -07:00 committed by GitHub
parent 26cd16c724
commit 670b0c35e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -91,10 +91,11 @@ class Launcher {
if (typeof options.headless !== 'boolean' || options.headless) {
chromeArguments.push(
'--headless',
'--disable-gpu',
'--hide-scrollbars',
'--mute-audio'
);
if (os.platform() === 'win32')
chromeArguments.push('--disable-gpu');
}
if (!options.ignoreDefaultArgs && Array.isArray(options.args) && options.args.every(arg => arg.startsWith('-')))
chromeArguments.push('about:blank');