-
Currently, when adding variables to 'Environment' they get saved to the .env file that's been set in 'Env File Path'. In case of an existing .env file at that location, the file gets completely overwritten with the values of the 'Environment' form. This could easily result in the loss of everything in the .env file if you're unaware of this behavior. To prevent this from happening, you could set an alternative env file in 'Additional Env Files'. However, I'm not sure which of those is designed to take precedence? Does the .env file override anything in additional env files, the other way around, or does something else happen? What is the intended behavior here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
By default for new Stack, it will write to the contents you set to Env File Path which you configure, which defaults to |
Beta Was this translation helpful? Give feedback.
By default for new Stack, it will write to the contents you set to Env File Path which you configure, which defaults to
.env
. If you already have a.env
in your folder which you don't want Komodo to manage directly, but you ALSO want Komodo to manage another file on top, you can set something else likekomodo.env
as Env File Path, and still pass.env
as Additional Env File. I didn't consider the ordering actually, as it is implemented in 1.16.12 the variables inkomodo.env
will be overridden by additional env files if there are any conflicts. Now that I see this, I think it should change to be flipped, so komodo env always takes precedence, can expect this change in 1.17 now.