Closed ktalebian closed 1 year ago
I wasn't able to reproduce this. Have you figured out what was wrong?
@ashald I'm experiencing this problem too, with IDEA 2020.1 and version 3.2.1 of your plugin.
For me, it was easy to reproduce on a toy project:
import os
print(os.getenv('FOOVAR'))
- Run that to generate a run configuration - it will print 'None'
- In the run configuration, add an environment variable of `FOOVAR=foo` - running it now prints 'foo'
- In the run configuration again, enable envfile and add a file with `FOOVAR=bar` in it, making sure not to change any other settings, and that this file is below `<Run Configuration Env Vars>` in the list - running the script now prints 'bar', even though it should print 'foo'
Playing with the settings (e.g. turning on environment variable substitution, changing the priority order of environment variable sources) doesn't seem to have any effect - the only ways I've found to achieve the desired behaviour are to either delete the env file from the list, or disable the plugin.
I hope that help you to get to the bottom of this. Let me know if I can provide any more detail.
Here is a screenshot of the config:
And here is the environment variable from the Configuration tab:
My
local.env
file hasSECRETS_DIR=/originalSecretDir
When I run my application, I get:Why is the configuration environment variable not replacing the env file?