Skip to content
This repository was archived by the owner on Jul 28, 2023. It is now read-only.

Commit d73380f

Browse files
kumarvialexkozy
authored andcommitted
feat: Support for passing args to carlo
Ability to specify additional arguments to carlo through an environment variable (NDB_CARLO_ARGS) Ref #238
1 parent a4ab9a3 commit d73380f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/launcher.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ process.on('unhandledRejection', error => {
1818

1919
async function launch() {
2020
let app;
21+
const carloArgs = process.env.NDB_CARLO_ARGS ? JSON.parse(process.env.NDB_CARLO_ARGS) : {};
2122
try {
2223
app = await carlo.launch({
2324
bgcolor: '#242424',
@@ -28,7 +29,8 @@ async function launch() {
2829
argv: process.argv,
2930
nodeExecPath: process.execPath
3031
})).toString('base64')
31-
}
32+
},
33+
...carloArgs
3234
});
3335
} catch (e) {
3436
if (e.message !== 'Could not start the browser or the browser was already running with the given profile.')

0 commit comments

Comments
 (0)