fix: don't break when git isn't configured yet

This commit is contained in:
Lockszmith (VAST@MacBook) 2025-04-18 17:15:08 -04:00
parent 0ef9b714ec
commit c730a1c804
1 changed files with 2 additions and 2 deletions

View File

@ -22,12 +22,12 @@
)) -}} )) -}}
{{- $gitEmail := promptStringOnce . "gitEmail" "email address (for git commits)" (or ( {{- $gitEmail := promptStringOnce . "gitEmail" "email address (for git commits)" (or (
env "CZ_GIT_EMAIL" env "CZ_GIT_EMAIL"
) ( output "git" "config" "user.email" ) ( output "sh" "-c" "git config user.email || true"
) ( list .chezmoi.username "@" .chezmoi.fqdnHostname | join "" ) ( list .chezmoi.username "@" .chezmoi.fqdnHostname | join ""
)) -}} )) -}}
{{- $gitName := promptStringOnce . "gitName" "Full name (for git commits)" (or ( {{- $gitName := promptStringOnce . "gitName" "Full name (for git commits)" (or (
env "CZ_GIT_NAME" env "CZ_GIT_NAME"
) ( output "git" "config" "user.name" ) ( output "sh" "-c" "git config user.name || true"
) ( list .chezmoi.username " (@" $sysname ")" | join "" ) ( list .chezmoi.username " (@" $sysname ")" | join ""
)) -}} )) -}}