Open bhuntpenn opened 2 years ago
Weirdly the JetBrains APIs for Run Configurations has support built in for an env file, but it’s not exposed in the UI component 🤷♀️
Weirdly the JetBrains APIs for Run Configurations has support built in for an env file, but it’s not exposed in the UI component 🤷♀️
Might be slightly different, in order to populate the environment variables the following needs to happen:
direnv export json
.envrc
is in it's list of allowed .envrc
files by checking for the file hash in the ~/.local/share/direnv/allow/
directory, for example:
cat ~/.local/share/direnv/allow/252176ea588c4f353333e3c88ffad8310bcdaa8e81b86be21d3ad9b158415a37
/Users/Bryan.Hunt/repos/secrit/.envrc
direnv
finds a matching hash, it evaluates that file (the file can contain commands to in turn evaluate other files.. and takes whatever env vars have changed and outputs JSON to stdout containing all the env vars. So... just evaluating the .env
file isn't sufficient, that's just a thing from older attempts to solve this problem.
I've opened an issue on the intellij-better-direnv project, given how popular direnv is, would be great if Intellij just made it work but I'm not going to hold my breath waiting for that to happen :-D
https://github.com/Fapiko/intellij-better-direnv/issues/4