mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Fix to call die if EOL data cannot be fetched in build time
This commit is contained in:
@@ -45,14 +45,12 @@ foreach my $os (@eol_oses) {
|
||||
&http_download('endoflife.date', 443, "/api/$os.json", \$fdata, \$ferror, undef, 1,
|
||||
undef, undef, 5);
|
||||
if ($ferror) {
|
||||
&error_stderr("Could not fetch OS EOL data: " . $ferror);
|
||||
next;
|
||||
die("Could not fetch OS EOL data: " . $ferror);
|
||||
}
|
||||
my $fdata_json;
|
||||
eval { $fdata_json = &convert_from_json($fdata); };
|
||||
if ($@) {
|
||||
&error_stderr("Could not parse fetched OS EOL data: $@");
|
||||
next;
|
||||
die("Could not parse fetched OS EOL data: $@");
|
||||
}
|
||||
# Add OS
|
||||
$fdata_json = [ map { $_->{'_os'} = $os; $_ } @$fdata_json ];
|
||||
|
||||
Reference in New Issue
Block a user