Updated IPV4 regex.

This commit is contained in:
Raphaël Numbus
2026-05-29 22:04:52 +02:00
parent 5ad0584e9e
commit f77e395635
+2 -2
View File
@@ -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;
}