From 9ba559f8e9471cbcce778f25a77dd50e2cd00d61 Mon Sep 17 00:00:00 2001 From: Filipe Kiss Date: Wed, 27 Mar 2019 09:42:50 -0300 Subject: [PATCH] Support Git Environment Credentials --- git-flow-init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-flow-init b/git-flow-init index 4cc7ed96..abb735c7 100644 --- a/git-flow-init +++ b/git-flow-init @@ -116,8 +116,8 @@ file= use given config file fi if git_config_bool_exists "user.useconfigonly"; then - user_email=$(git config --get user.email) - user_name=$(git config --get user.name) + user_email=$(git config --get user.email || echo $GIT_AUTHOR_EMAIL) + user_name=$(git config --get user.name || echo $GIT_AUTHOR_NAME) if [ -z "${user_email}" ] || [ -z "${user_name}" ]; then die "Configuration useconfigonly is set but no name and/or email was set" fi