From 468acc22c79320d2b243c22a5cca17e55ff80a30 Mon Sep 17 00:00:00 2001 From: "sami@samhuri.net" Date: Sat, 2 May 2026 09:26:25 -0700 Subject: [PATCH] Fix jj identity check in init.sh jj config get exits 0 for empty defaults, so the old exit-code check always concluded name/email were already set. Switch to checking the actual output value instead. --- init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.sh b/init.sh index 461fa26..b2a27fd 100755 --- a/init.sh +++ b/init.sh @@ -67,14 +67,14 @@ setup_jj_identity() { return 0 fi - if ! jj config get user.name >/dev/null 2>&1; then + if [ -z "$(jj config get user.name 2>/dev/null)" ]; then jj config set --user user.name "Sami Samhuri" echo "→ Set jj user.name" else echo "✓ jj user.name already set" fi - if ! jj config get user.email >/dev/null 2>&1; then + if [ -z "$(jj config get user.email 2>/dev/null)" ]; then jj config set --user user.email "sami@samhuri.net" echo "→ Set jj user.email" else