From 670b0c35e454be6fc73d2a10ef8a86abd3bc11d7 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 19 Jul 2018 10:19:08 -0700 Subject: [PATCH] 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. --- lib/Launcher.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Launcher.js b/lib/Launcher.js index f3932623aa4..14a89a4b424 100644 --- a/lib/Launcher.js +++ b/lib/Launcher.js @@ -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');