Merge pull request #587 from gravndal/realpath
Some checks failed
Test / tests (ubuntu-latest, latest) (push) Has been cancelled
Test / tests (ubuntu-latest, stable) (push) Has been cancelled

resolve symbolic links to nixpkgs
This commit is contained in:
Bryan Bennett 2025-06-17 14:00:06 +00:00 committed by GitHub
commit c3b16828a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -361,7 +361,7 @@ use_nix() {
local layout_dir path version
layout_dir=$(direnv_layout_dir)
if path=$(_nix eval --impure --expr "<nixpkgs>" 2>/dev/null); then
if path=$(realpath -e "$(_nix eval --impure --expr "<nixpkgs>" 2>/dev/null)"); then
if [[ -f "${path}/.version-suffix" ]]; then
version=$(<"${path}/.version-suffix")
elif [[ -f "${path}/.git/HEAD" ]]; then