From 44b8f9d0677a317724cb9d1a309928cdf91c8f92 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 18 May 2025 20:59:41 +0200 Subject: [PATCH] Ensure we only set if there is some data in these variables --- install/terminal/set-git.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install/terminal/set-git.sh b/install/terminal/set-git.sh index 670ec08..584711c 100644 --- a/install/terminal/set-git.sh +++ b/install/terminal/set-git.sh @@ -6,5 +6,10 @@ git config --global alias.st status git config --global pull.rebase true # Set identification from install inputs -git config --global user.name "$OMAKUB_USER_NAME" -git config --global user.email "$OMAKUB_USER_EMAIL" +if [[ -n "${OMAKUB_USER_NAME//[[:space:]]/}" ]]; then + git config --global user.name "$OMAKUB_USER_NAME" +fi + +if [[ -n "${OMAKUB_USER_EMAIL//[[:space:]]/}" ]]; then + git config --global user.email "$OMAKUB_USER_EMAIL" +fi