You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would provide a workaround for #1696 since user could just pass a TMPDIR override directly to run(). Currently user has to override it in a different way:
in CLI by running, e.g. TMPDIR=~/tmp web-ext run or TMPDIR=~/tmp node test.js
in NodeJS process, e.g. process.env.TMPDIR = '~/tmp'
For reference, I used the second method in my software, but it is not ideal since it overrides environment variable for the entire process.
Ultimately tmp package (source) relies on os.tmpdir() (Node.js source). The tmp package supports overriding with tmpdir option, but that only affects the tmp package and not other dependencies if any.
Since there is already a standard option to override the tmp dir (with the environment variable), we are not going to introduce a new option to web-ext to customize it. If you want to use web-ext as a library without affecting other code in your project, use child_process to spawn a new process with its own env where you can override TMPDIR.
Is this a feature request or a bug?
Feature request
What is the current behavior?
web-ext
functionrun
takes temporary directory location from environment variableTMPDIR
without a way to override it.What is the expected or desired behavior?
run()
function accepts an argument which has a precedence overTMPDIR
.Version information (for bug reports)
v18.7.0
8.18.0
7.5.0
The text was updated successfully, but these errors were encountered: