mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-11 17:29:52 +00:00
abuild-keygen: Fix crash on unknown git user.email
This commit is contained in:
parent
3da770ce35
commit
e520288df5
@ -27,7 +27,7 @@ get_privkey_file() {
|
|||||||
|
|
||||||
# if PACKAGER does not contain a valid email address, then ask git
|
# if PACKAGER does not contain a valid email address, then ask git
|
||||||
if [ -z "$emailaddr" ] || [ "${emailaddr##*@}" = "$emailaddr" ]; then
|
if [ -z "$emailaddr" ] || [ "${emailaddr##*@}" = "$emailaddr" ]; then
|
||||||
emailaddr=$(git config --get user.email 2>/dev/null)
|
emailaddr=$(git config --get user.email 2>/dev/null || true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
default_name="${emailaddr:-$USER}-$(printf "%x" $(date +%s))"
|
default_name="${emailaddr:-$USER}-$(printf "%x" $(date +%s))"
|
||||||
|
Loading…
Reference in New Issue
Block a user