-
Notifications
You must be signed in to change notification settings - Fork 696
Closed
Labels
Description
Describe the bug
When using source_env
to source .envrc
from a subdirectory, the subdirectory is printed twice in the printed path.
To Reproduce
Run this in bash:
mkdir -p subdir
EDITOR=tee direnv edit subdir <<<"echo From subdir"
EDITOR=tee direnv edit . <<<"source_env subdir"
You will get something like:
direnv: loading ~/tmp/.envrc
direnv: loading ~/tmp/subdir/subdir/.envrc
From subdir
Expected behavior
The printed message should be:
direnv: loading ~/tmp/.envrc
direnv: loading ~/tmp/subdir/.envrc
From subdir
The difference is in the middle line.
Environment
- OS: NixOS
- Shell: should not matter (zsh)
- Direnv version 2.32.3
Additional context
I'll post a PR with a fix.