diff options
-rwxr-xr-x | Master/texmf-dist/scripts/texlive/tlmgr.pl | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl index 2d1ed80cbc2..9601fe4cea8 100755 --- a/Master/texmf-dist/scripts/texlive/tlmgr.pl +++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl @@ -3577,16 +3577,24 @@ sub show_one_package_csv { if ($d eq "name") { push @out, $p; } elsif ($d eq "category") { - push @out, $tlp->category; + push @out, $tlp->category || ""; } elsif ($d eq "shortdesc") { my $str = $tlp->shortdesc; - $str =~ s/"/\\"/g; - push @out, "\"$str\""; + if (defined $tlp->shortdesc) { + $str =~ s/"/\\"/g; + push @out, "\"$str\""; + } else { + push @out, ""; + } } elsif ($d eq "longdesc") { my $str = $tlp->longdesc; - $str =~ s/"/\\"/g; - $str =~ s/\n/\\n/g; - push @out, "\"$str\""; + if (defined $tlp->shortdesc) { + $str =~ s/"/\\"/g; + $str =~ s/\n/\\n/g; + push @out, "\"$str\""; + } else { + push @out, ""; + } } elsif ($d eq "installed") { push @out, $is_installed; } elsif ($d eq "relocatable") { |