From f6f1b643cad158387cfd18d579d07c274630f25a Mon Sep 17 00:00:00 2001 From: Mari Date: Wed, 25 Dec 2019 14:56:04 -0500 Subject: [PATCH] Don't fail on git config --get unset --- new-host.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/new-host.sh b/new-host.sh index 74f2159..13dd988 100644 --- a/new-host.sh +++ b/new-host.sh @@ -29,8 +29,8 @@ if [[ "$ORIGIN" != 'git@github.com:programmablereya/common-configs.git' ]]; then git remote set-url origin git@github.com:programmablereya/common-configs.git fi -GITMAIL=$(git config user.email) -GITUSER=$(git config user.name) +GITMAIL=$(git config --get user.email || true) +GITUSER=$(git config --get user.name || true) if [[ "$GITMAIL" != 'mstaib.git@reya.zone' ]] || [[ "$GITUSER" != 'Mari' ]]; then git config user.email 'mstaib.git@reya.zone' git config user.name 'Mari'