Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout within nested environments broken #297

Closed
elventear opened this issue Sep 25, 2017 · 4 comments · Fixed by #298
Closed

Layout within nested environments broken #297

elventear opened this issue Sep 25, 2017 · 4 comments · Fixed by #298
Labels

Comments

@elventear
Copy link

elventear commented Sep 25, 2017

I just updated to direnv v2.13.0 and I see un expected behavior. I have a tree of directories with nested environments that source the top level using source_up. In the highest level I have a custom Python virtualenv defined by using layout python python2.7. In the children I would have custom settings but I would not define a new layout for python.

Up to direnv v2.12.2 the way it worked is that if I moved into a child directory a Python virtualenv would be configured by the parent .envrc within a .direnv directory within the parent. All the children would share the same version of Python.

When I upgraded to direnv v2.13.0, now every time I move into a child directory, a new version of the virtualenv is created within a .direnv directory in the children directories, instead of reusing the parent .direnv.

Is this a bug or a change in behavior?

@zimbatm zimbatm added the Bug label Sep 26, 2017
@zimbatm
Copy link
Member

zimbatm commented Sep 26, 2017

I'm trying not to break backward-compatibility so this is a bug. I know what the issue is but need a bit of time to think of a good solution.

In the mean time you work around the issue by setting this additional line at the top of the top-level .envrc:

direnv_layout_dir=$PWD/.direnv

@zimbatm
Copy link
Member

zimbatm commented Sep 26, 2017

@elventear do you mind trying #298 out?

@elventear
Copy link
Author

#298 works for me 👍

@zimbatm
Copy link
Member

zimbatm commented Sep 26, 2017

Thanks! cutting a new release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants