From 90701234700dbf601caa353833c31a0566def815 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 2 Mar 2024 17:16:06 +0400 Subject: [PATCH] auto_detect_email can fetch from defaults.yaml --- lib/install.sh | 2 ++ 1 file changed, 2 insertions(+) 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