texlive[45102] Master/texmf-dist/scripts/texlive/tlmgr.pl: Added a

commits+siepo at tug.org commits+siepo at tug.org
Wed Aug 23 11:38:03 CEST 2017


Revision: 45102
          http://tug.org/svn/texlive?view=revision&revision=45102
Author:   siepo
Date:     2017-08-23 11:38:03 +0200 (Wed, 23 Aug 2017)
Log Message:
-----------
Added a couple of existence tests to tlmgr info --data

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl

Modified: trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl
===================================================================
--- trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2017-08-23 04:39:57 UTC (rev 45101)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2017-08-23 09:38:03 UTC (rev 45102)
@@ -3577,16 +3577,24 @@
     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") {



More information about the tex-live-commits mailing list