Hey, all.
I have following use case: I've got $GOPATH set in .envrc to $PWD, in src I have a project with another .envrc file to set $GO15VENDOREXPERIMENT environment variable. When I go to the folder of my project in src dir, $GOPATH is removed from the environment.
Here is a file system tree for this case
โ tree
.
โโโ .envrc # .envrc to set $GOPATH
โโโ src #
โโโ github.com #
โโโ Altoros #
โโโ my-project #
โโโ .envrc # .envrc to set $
โโโ vendor
โโโ github.com
โโโ ...
As I understand from this doc, direnv stops searching for another .envrc files after it finds one. Still possibly for this case it would be better to search all parents.
What do you think?
Hi @allomov,
did you have a look at the stdlib as well ? By adding source_up in your child's envrc it will load the parent's envrc.
This is very nice, thank you!
If anyone found this issue via github, the full stdlib docs are now found here
Most helpful comment
Hi @allomov,
did you have a look at the stdlib as well ? By adding
source_upin your child's envrc it will load the parent's envrc.