* [pve-devel] [PATCH installer] proxinstall: fix empty error message when default hostname is not changed
@ 2024-02-27 9:33 Christoph Heiss
0 siblings, 0 replies; only message in thread
From: Christoph Heiss @ 2024-02-27 9:33 UTC (permalink / raw)
To: pve-devel
Perl strikes again - while an empty string evaluates falsy in Perl, it
is still defined and thus the //-operator cannot be used here.
Fixes: 93892c0 ("proxinstall: avoid open-coding FQDN sanity check")
Reported-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
proxinstall | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/proxinstall b/proxinstall
index 351b240..d28aeaa 100755
--- a/proxinstall
+++ b/proxinstall
@@ -461,7 +461,8 @@ sub create_ipconf_view {
my $err = $@;
if ($err || $text =~ m/.example.invalid$/) {
- Proxmox::UI::message($err // 'Hostname does not look like a valid fully qualified domain name');
+ $err = 'Hostname does not look like a valid fully qualified domain name' if !$err;
+ Proxmox::UI::message($err);
$hostentry->grab_focus();
return;
} else {
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-27 9:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 9:33 [pve-devel] [PATCH installer] proxinstall: fix empty error message when default hostname is not changed Christoph Heiss
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.