Add support for --env-file=
flag for node 20 in nodeArguments
#3293
Replies: 2 comments 1 reply
-
However with worker threads, not all arguments have an effect. Some values are inherited from the main process. My guess is that this is the case for Running the following should work: NODE_OPTIONS="--env-file=.env" npx ava This way, the env vars are added to the main AVA process and should be inherited by the worker threads. See also nodejs/node#37410. |
Beta Was this translation helpful? Give feedback.
-
Hmm, seems like that's not allowed actually
I've solved it by falling back to Could it be an alternative to add an |
Beta Was this translation helpful? Give feedback.
-
Please provide details about:
I was hoping that I could add a config like:
and get access to the environments loaded by Node from that file.
--env-fileconfig
Even though ava accepts the nodeArguments config above the result of running:
in a test is this:
Would it be possible to make ava pass this on to node so it gets loaded as environment variables
Beta Was this translation helpful? Give feedback.
All reactions