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

DEVENV_ROOT is incorrect if project moves #1479

Open
therealpxc opened this issue Sep 26, 2024 · 1 comment
Open

DEVENV_ROOT is incorrect if project moves #1479

therealpxc opened this issue Sep 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@therealpxc
Copy link
Contributor

therealpxc commented Sep 26, 2024

Describe the bug
When a project moves, its .direnv cache still exists and has cached the old DEVENV_ROOT value. This breaks scripts that refer to DEVENV_ROOT (for instance Poetry activation in the Python language module).

To reproduce
Create a devenv project, activate direnv with direnv allow and cd into it. Then rename the project directory to something else, leave the directory and return to it. Run direnv allow and then echo $DEVENV_ROOT.

Version

devenv 1.1.0 (aarch64-darwin)

Workaround
Problem goes away if you nuke .direnv.

@therealpxc therealpxc added the bug Something isn't working label Sep 26, 2024
@therealpxc
Copy link
Contributor Author

Maybe we can fix this by adding a file under .devenv whose contents are the last value of DEVENV_ROOT, and add it to our direnv watched files? I'd be happy to implement that if that solution is agreeable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant