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

Source parent directory's .env.leave file when leaving subdirectory #236

Open
chrysle opened this issue May 20, 2024 · 0 comments
Open

Source parent directory's .env.leave file when leaving subdirectory #236

chrysle opened this issue May 20, 2024 · 0 comments

Comments

@chrysle
Copy link

chrysle commented May 20, 2024

First of all, thanks for this handy tool!

Is your feature request related to a problem? Please describe.

I have a directory containing multiple Git repositories and a .env file. Now, whenever I cd into one of these subdirectories, the parent's .env file is executed, as intended, and activates a virtual environment it searches in another directory. Now, in the same folder I configured a .env.leave file to deactivate such an environment once I leave it again. However, when I leave the folder, the .env.leave is not sourced – which I find a bit odd, considering that parental .env files are when entering.

Describe the solution you'd like

I'd like to have a .env.leave file executed whenever I leave a subdirectory of the directory where it is residing (and the same) – probably only depth 1, or to be configured.

Describe alternatives you've considered

Deactivating manually. It isn't a big deal, or copying a similar .env.leave file into each of my repositories – it would be slightly suboptimal though, for I'd have to tell Git to not bother about this "untracked change".

Additional context

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

No branches or pull requests

1 participant