diff --git a/script/deploy.sh b/script/deploy.sh index 662df4a..956ec4b 100755 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -47,7 +47,7 @@ get_valid_input() { # Handle Regex Validation if [[ -n "${REGEX}" ]]; then - if [[ ${INPUT} =~ ${REGEX} ]]; then + if [[ "${INPUT}" =~ ${REGEX} ]]; then export "${VAR_NAME}"="${INPUT}" break else @@ -117,7 +117,7 @@ setup_ssh() { Target IP address : $(gum style --italic "\"${LIVE_TARGET_IP}\"") Target password : $(gum style --italic "\"${LIVE_TARGET_PASSWORD}\"")" gum confirm "Are these correct ?" || { - get_valid_input "LIVE_TARGET_IP" "➡️ Provide the IP address of your machine in a NixOS live environment :" "192.168.1.100" "IP_REGEX"; + get_valid_input "LIVE_TARGET_IP" "➡️ Provide the IP address of your machine in a NixOS live environment :" "192.168.1.100" "${IP_REGEX}"; get_valid_input "LIVE_TARGET_PASSWORD " "➡️ Provide the password of your machine in a NixOS live environment :" "password" "" "true" "true"; continue; }