diff --git a/lib/install.sh b/lib/install.sh index d53697a..330f9ee 100755 --- a/lib/install.sh +++ b/lib/install.sh @@ -433,6 +433,8 @@ function is_email_valid { function auto_detect_email { found_email="${EMAIL:-}" + [[ -z "$found_email" ]] && [[ -f /etc/miaou/defaults.yaml ]] && found_email=$(yq '.credential.email' /etc/miaou/defaults.yaml) + [[ "$found_email" == 'null' ]] && found_email='' if ! is_email_valid "$found_email"; then if [[ -f $HOME/.ssh/authorized_keys ]]; then while IFS= read -r line; do