Skip to content

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

Merged
zimbatm merged 1 commit intodirenv:masterfrom
jyn514:no-pwd
Mar 25, 2025
Merged

Don't give an error when the current directory doesn't exist#1395
zimbatm merged 1 commit intodirenv:masterfrom
jyn514:no-pwd

Conversation

@jyn514
Copy link
Copy Markdown
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
Copy Markdown
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