mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
direnvrc: Fix reading of nixpkgs version from git checkout
This commit is contained in:
parent
003dd8b808
commit
19372436ef
1 changed files with 1 additions and 1 deletions
2
direnvrc
2
direnvrc
|
|
@ -114,7 +114,7 @@ use_nix() {
|
||||||
read -r head < "${path}/.git/HEAD"
|
read -r head < "${path}/.git/HEAD"
|
||||||
local regex="ref: (.*)"
|
local regex="ref: (.*)"
|
||||||
if [[ "$head" =~ $regex ]]; then
|
if [[ "$head" =~ $regex ]]; then
|
||||||
read -r version < ".git/${BASH_REMATCH[1]}"
|
read -r version < "${path}/.git/${BASH_REMATCH[1]}"
|
||||||
else
|
else
|
||||||
version="$head"
|
version="$head"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue