Skip to content

Don't give an error when the current directory doesn't exist #1395

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

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

jyn514
Copy link
Contributor

@jyn514 jyn514 commented Mar 16, 2025

This just indicates that there is no configuration for the current directory; it doesn't need to generate logging.

Fixes #455

Comment on lines +391 to +392
if searchDir == "" {
return ""
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i tested and this actually works fine without the explicit return, but i was worried that it would search parent directories or something like that.

This just indicates that there is no configuration for the current
directory; it doesn't need to generate logging.
@zimbatm zimbatm merged commit 9130d31 into direnv:master Mar 25, 2025
14 checks passed
@jyn514 jyn514 deleted the no-pwd branch March 25, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

In non-existent directory, reloading shell prompt -> error LoadConfig() Getwd failed: "getwd: no such file or directory"
2 participants