From 9e6f779322b5a9a8093c4738150aa1b623142fb2 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 20 Jun 2017 19:47:12 -0700 Subject: [PATCH] Fix running on Travis-Ci --- .travis.yml | 1 + lib/Browser.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 21b16050c6f..f3b981ddbfd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ node_js: - "7" dist: trusty env: + - DISABLE_CHROMIUM_SANDBOX=true cache: yarn: true directories: diff --git a/lib/Browser.js b/lib/Browser.js index e6452462706..c8a7f922fb8 100644 --- a/lib/Browser.js +++ b/lib/Browser.js @@ -51,6 +51,8 @@ class Browser { `--disable-gpu`, ]); } + if (process.env['DISABLE_CHROMIUM_SANDBOX']) + this._chromeArguments.push('--no-sandbox'); if (typeof options.executablePath === 'string') { this._chromeExecutable = options.executablePath; } else {