direnvrc: Fix reading of nixpkgs version from git checkout

This commit is contained in:
Moritz Heidkamp 2020-12-21 15:29:26 +01:00
parent 003dd8b808
commit 19372436ef

View file

@ -114,7 +114,7 @@ use_nix() {
read -r head < "${path}/.git/HEAD"
local regex="ref: (.*)"
if [[ "$head" =~ $regex ]]; then
read -r version < ".git/${BASH_REMATCH[1]}"
read -r version < "${path}/.git/${BASH_REMATCH[1]}"
else
version="$head"
fi