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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user