Skip to content

Commit eb7a6da

Browse files
committed
fix: ability to disable "headless" option using cli or env
1 parent 6fd3ea5 commit eb7a6da

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/config/browser-options.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,20 @@ function buildBrowserOptions(defaultFactory, extra) {
352352
region: options.optionalString("region"),
353353
headless: option({
354354
defaultValue: defaultFactory("headless"),
355+
parseCli: value => {
356+
try {
357+
return utils.parseBoolean(value);
358+
} catch (_) {
359+
return value;
360+
}
361+
},
362+
parseEnv: value => {
363+
try {
364+
return utils.parseBoolean(value);
365+
} catch (_) {
366+
return value;
367+
}
368+
},
355369
validate: value => {
356370
if (_.isNull(value) || _.isBoolean(value)) {
357371
return;

0 commit comments

Comments
 (0)