Fix check for OS made in MustDisableSandbox() (#3631)

Signed-off-by: iamargus95 <kamathsuraj95@gmail.com>
dev
Suraj Kamath 2023-05-02 15:04:24 +05:30 committed by GitHub
parent bdf476fbd4
commit 537814bae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ func New(options *types.Options) (*Browser, error) {
func MustDisableSandbox() bool { func MustDisableSandbox() bool {
// linux with root user needs "--no-sandbox" option // linux with root user needs "--no-sandbox" option
// https://github.com/chromium/chromium/blob/c4d3c31083a2e1481253ff2d24298a1dfe19c754/chrome/test/chromedriver/client/chromedriver.py#L209 // https://github.com/chromium/chromium/blob/c4d3c31083a2e1481253ff2d24298a1dfe19c754/chrome/test/chromedriver/client/chromedriver.py#L209
return osutils.IsWindows() && os.Geteuid() == 0 return osutils.IsLinux() && os.Geteuid() == 0
} }
// SetUserAgent sets custom user agent to the browser // SetUserAgent sets custom user agent to the browser