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

fix(dotenv): let dotenv support relative devenv.root #718

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Atry
Copy link
Contributor

@Atry Atry commented Jul 11, 2023

This PR avoids lib.pathExists, which does not support relative path

@Atry Atry changed the title Let dotenv support relative path Let dotenv support relative devenv.root Jul 11, 2023
@Atry
Copy link
Contributor Author

Atry commented Jul 11, 2023

This PR can partially solve #658

@Atry
Copy link
Contributor Author

Atry commented Jul 11, 2023

By the way, the original implementation using lib.pathExists is simply buggy even when devenv.root is absolute, because lib.pathExists is evaluated only when flake.nix changes given that the evaluation result is cached by direnv, while we want to test if .env exists each time when entering the shell.

@Atry
Copy link
Contributor Author

Atry commented Jul 11, 2023

More broadly, using devenv.root at nix evaluation time is always error prone.

@Atry Atry closed this Jul 20, 2023
@Atry Atry reopened this Jul 20, 2023
@Atry
Copy link
Contributor Author

Atry commented Jul 20, 2023

Reopen this PR to trigger CI

@Atry
Copy link
Contributor Author

Atry commented Jul 20, 2023

@domenkozar Could you trigger the CI, please?

@Atry Atry changed the title Let dotenv support relative devenv.root fix(dotenv): let dotenv support relative devenv.root Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant