Closed lowlighter closed 2 months ago
Basically doing something like:
if (!args.find(arg => arg.startsWith("--user-data-dir=")) { const tempDir = Deno.makeTempDirSync(); args.push(
--user-data-dir=${tempDir}
) }
I would support this. If you want to submit a PR this makes sense to me.
I haven't personally tested yet, but firefox may not have this arg
Firefox compatibility is currently really broken. Hoping that #84 fixes it in the medium-long term.
Currently you always need the temp dir in
--allow-write
because the following is not gated so you'll always hit a permission request: https://github.com/lino-levan/astral/blob/7e91588e342561a2e5a3b515e7b3cedf6683d02b/src/browser.ts#L253And the arg
--user-data-dir
is always set by astral: https://github.com/lino-levan/astral/blob/7e91588e342561a2e5a3b515e7b3cedf6683d02b/src/browser.ts#L261But it'd be nice if the above lines are ignored if user specify the arg theymselves in
args
: https://github.com/lino-levan/astral/blob/7e91588e342561a2e5a3b515e7b3cedf6683d02b/src/browser.ts#L232Basically doing something like:
I know the workaround from #56, but setting TMPDIR is not always convenient because: