From 7874108fda7895d8ea55b1b043498e919fc9075b 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 21b16050..f3b981dd 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 e6452462..c8a7f922 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 {