Open Weltraumschaf opened 3 years ago
I will look into it. Most of the time I use the plugin to augment $PATH
for specific java versions/nodejs/yarn.
@Weltraumschaf what would you expect if you have multiple run configurations?
should all of them reflect the state of direnv at the time when u clicked on the "import direnv" ballon?
which type of environment list should these variables appear under? the "System" or the "User" environment?
are any of those System or User environments under source control? (committed to git for example?) (im not using spring, so im not familiar with those specific dialogs.)
btw, export PROJECT="$(pwd)"
might be better done by export PROJECT="$PWD"
, to avoid shelling out.
im not confident that the current directory is always the same as the directory containing your .envrc
file though.
i can't remember it being explained in the direnv docs. sounds intuitive and i've checked, it works like that under macOS at least, but i wouldn't trust it necessarily:
pwd
export d=~/pwd-test
mkdir $d
echo 'export PROJECT="$(pwd)"' > $d/.envrc
direnv allow $d
direnv exec $d bash -c 'echo PWD: $PWD; echo PROJECT: $PROJECT'
the output is:
/Users/onetom
direnv: loading ~/pwd-test/.envrc
PWD: /private/tmp
PROJECT: /Users/onetom/pwd-test
I've defined some env vars in
.envrc
for Spring Boot in the projects root dir :When I configure a run config via "Run" -> "Edit configurations..." and select under "Spring Boot" the class "Application", then open the "Environment Variables", there are none of the above variables, neither in "User environment variables" nor in the "System environemnt variables".
When I open the project the "import direnv" balloon shows up and I always click to import. What am I doing wrong?