From ea257f113029c28e8c1fc571a53f843865e53e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 18 Oct 2019 12:37:54 +0000 Subject: [PATCH] make nixpkgs git detection a wee bit more precise --- direnvrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direnvrc b/direnvrc index c3b3635..842d57a 100644 --- a/direnvrc +++ b/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