From c730a1c8049a895d16f903df4a5f12833b60aa7a Mon Sep 17 00:00:00 2001 From: "Lockszmith (VAST@MacBook)" Date: Fri, 18 Apr 2025 17:15:08 -0400 Subject: [PATCH] fix: don't break when git isn't configured yet --- chezmoi.roots/_src.all/.chezmoi.toml.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chezmoi.roots/_src.all/.chezmoi.toml.tmpl b/chezmoi.roots/_src.all/.chezmoi.toml.tmpl index 958bd03..021e4c0 100644 --- a/chezmoi.roots/_src.all/.chezmoi.toml.tmpl +++ b/chezmoi.roots/_src.all/.chezmoi.toml.tmpl @@ -22,12 +22,12 @@ )) -}} {{- $gitEmail := promptStringOnce . "gitEmail" "email address (for git commits)" (or ( env "CZ_GIT_EMAIL" - ) ( output "git" "config" "user.email" + ) ( output "sh" "-c" "git config user.email || true" ) ( list .chezmoi.username "@" .chezmoi.fqdnHostname | join "" )) -}} {{- $gitName := promptStringOnce . "gitName" "Full name (for git commits)" (or ( env "CZ_GIT_NAME" - ) ( output "git" "config" "user.name" + ) ( output "sh" "-c" "git config user.name || true" ) ( list .chezmoi.username " (@" $sysname ")" | join "" )) -}}