Skip to content

Commit

Permalink
Accept new user email address as-is. Do not transform to lowercase. R…
Browse files Browse the repository at this point in the history
…esolves PR #3.
  • Loading branch information
adamdehaven committed Feb 17, 2021
1 parent f77217b commit deb8d91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions changeauthor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# the rewritten history and rebase any local changes into the rewritten history.
#

VERSION="v2.3.0"
VERSION="v2.3.1"

# Set Defaults
SHOW_HELP=0
Expand Down Expand Up @@ -67,15 +67,15 @@ while (("$#")); do
# USER_NEW_EMAIL
-e | --new-email)
if [ "$2" ]; then
USER_NEW_EMAIL=$(echo "$2" | awk "{print tolower(\$0)}")
USER_NEW_EMAIL="$2"
shift # Remove argument name from processing
else
echo "${COLOR_RED}ERROR: Value for $1 is required."${COLOR_RESET} >&2
exit 1
fi
;;
-e=*? | --new-email=*?)
USER_NEW_EMAIL=$(echo "${1#*=}" | awk "{print tolower(\$0)}")
USER_NEW_EMAIL="${1#*=}"
;;
# USER_NEW_NAME
-n | --new-name)
Expand Down Expand Up @@ -319,7 +319,7 @@ if [ -z "$USER_NEW_EMAIL" ]; then
exit 1
else
# Set USER_NEW_EMAIL and transform to lowercase
USER_NEW_EMAIL=$(echo "$USER_NEW_EMAIL" | awk "{print tolower(\$0)}")
USER_NEW_EMAIL="${USER_NEW_EMAIL}"
fi

if [ "$USER_OLD_EMAIL" == "$USER_NEW_EMAIL" ]; then
Expand Down

0 comments on commit deb8d91

Please sign in to comment.