Skip to content

Terminal forgets the environment variables of .env file (if the terminal is killed) #23

Answered by cromewar
Prezzy06 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello there @Prezzy06 if you setup for env files into your console they are just going to be there as far as you have that terminal opened, foundry relates on TOML files which unfortunately just support .env variables at runtime, it means just when you have that terminal instance opened as I just said. This is to how Forge works.

Please check out this: foundry-rs/foundry#1034 here they discuss this problem and end up adding support for .env.
But as mentioned forge does not support .env files natively, check this: foundry-rs/foundry#2430 (comment)

So, for now the only way is to use that source .env and runtime.

Do you know any workaround for this @PatrickAlphaC ?

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Prezzy06
Comment options

@cromewar
Comment options

@PatrickAlphaC
Comment options

@Prezzy06
Comment options

Answer selected by cromewar
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants