mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 11:36:11 +01:00
make nixpkgs git detection a wee bit more precise
This commit is contained in:
parent
983f7b8154
commit
ea257f1130
1 changed files with 1 additions and 1 deletions
2
direnvrc
2
direnvrc
|
|
@ -3,7 +3,7 @@ use_nix() {
|
|||
|
||||
if [ -f "${path}/.version-suffix" ]; then
|
||||
local version="$(< $path/.version-suffix)"
|
||||
elif [ -d "${path}/.git" ]; then
|
||||
elif [ -f "${path}/.git/HEAD" ]; then
|
||||
local head=$(< ${path}/.git/HEAD)
|
||||
local regex="ref: (.*)"
|
||||
if [[ "$head" =~ $regex ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue