Am 26/03/2024 um 14:29 schrieb Christoph Heiss: > Bit of perl fun again. > $err from detect_country_tracing_to() can be empty string under certain > circumstances (according to a forum post [0]). The // operator > evaluates an empty as true, thus `warn` receives an empty string to and > just prints > > Warning: something wrong at /usr/share/perl5/proxmox/Install/RunEnv.pm line > 305 > > Which isn't particular helpful. Use the || operator instead, that > evaluates an empty string as false and thus would fall back to the > generic error message. > > A minimal reproducer/example for completeness sake: > > #!/usr/bin/env perl > use strict; > use warnings; > > warn ('' // "unable to detect country\n"); > warn ('' || "unable to detect country\n"); > > gives > > Warning: something's wrong at ./test.pl line 5. > unable to detect country > > [0] https://forum.proxmox.com/threads/blank-screen-while-installing.143928/ > > Signed-off-by: Christoph Heiss <c.he...@proxmox.com> > --- > Proxmox/Install/RunEnv.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >
applied, thanks! _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel