Fix to use shell command with direct file writing for EOL data file

This commit is contained in:
Ilia Ross
2025-03-23 15:44:36 +02:00
parent fdbf960a2c
commit 16fec003dc

View File

@@ -64,10 +64,9 @@ foreach my $os (@eol_oses) {
push(@eol_oses_data, @$fdata_json);
}
my $eol_oses_data = &convert_to_json(\@eol_oses_data);
&backquote_command("echo -n '$eol_oses_data' > $eol_cache_file 2>&1 </dev/null");
if ($?) {
die("Could not write OS EOL data file : $?");
}
open(my $fh, '>', $eol_cache_file) or die("Could not open OS EOL data file for writing: $!");
print $fh $eol_oses_data;
close($fh) or die("Could not close OS EOL data file: $!");
}
# eol_get_os_data()