From bb45d3ef2f676630c0c446d3aaeef047c87de5b5 Mon Sep 17 00:00:00 2001 From: Timothy Kim Date: Fri, 13 Mar 2026 12:25:18 -0400 Subject: [PATCH] fix git-crypt unlock detection Check for .git/git-crypt/keys directory which only exists after unlock, instead of parsing git-crypt status output which shows "encrypted:" regardless of lock state. --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index e535216..42d531c 100644 --- a/setup.sh +++ b/setup.sh @@ -39,7 +39,7 @@ fi # --- Unlock git-crypt via Bitwarden --- cd "$REPO_DIR" -if git-crypt status 2>/dev/null | grep -q ' encrypted:'; then +if [ ! -d "$REPO_DIR/.git/git-crypt/keys" ]; then echo "==> Fetching git-crypt key from Bitwarden..." echo " Log in to Bitwarden when prompted." if bw status 2>/dev/null | grep -q '"status":"unauthenticated"'; then