fix(core): update

This commit is contained in:
2020-02-25 01:38:24 +00:00
parent 190d57bbe2
commit 5dd6450347
4 changed files with 67 additions and 73 deletions

View File

@ -16,7 +16,7 @@ export const getEnvAwareBrowserInstance = async (
};
let chromeArgs: string[] = [];
if ((process.env.CI || options.forceNoSandbox) && !smartenv.isWsl) {
if ((process.env.CI || options.forceNoSandbox || plugins.os.userInfo().username === 'root') && !smartenv.isWsl) {
chromeArgs = chromeArgs.concat(['--no-sandbox', '--disable-setuid-sandbox']);
} else if (smartenv.isWsl) {
console.log('Detected WSL.');

View File

@ -1,3 +1,10 @@
// node native scope
import * as os from 'os';
export {
os
};
// @pushrocks scope
import * as smartdelay from '@pushrocks/smartdelay';
import * as smartenv from '@pushrocks/smartenv';