mirror of
https://github.com/samsonjs/config.git
synced 2026-06-24 04:59:08 +00:00
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.
This commit is contained in:
parent
95222a65b9
commit
468acc22c7
1 changed files with 2 additions and 2 deletions
4
init.sh
4
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue