texlive[45719] Master/texmf-dist/scripts/texlive/tlmgr.pl: compress

commits+preining at tug.org commits+preining at tug.org
Wed Nov 8 13:19:02 CET 2017


Revision: 45719
          http://tug.org/svn/texlive?view=revision&revision=45719
Author:   preining
Date:     2017-11-08 13:19:02 +0100 (Wed, 08 Nov 2017)
Log Message:
-----------
compress json to one line

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-11-08 01:22:21 UTC (rev 45718)
+++ trunk/Master/texmf-dist/scripts/texlive/tlmgr.pl	2017-11-08 12:19:02 UTC (rev 45719)
@@ -1491,7 +1491,7 @@
   if ($opts{'data'}) {
     @adds = @datafields;
   }
-  print "[\n" if ($fmt eq "json");
+  print "[" if ($fmt eq "json");
   my $first = 1;
   foreach my $ppp (@whattolist) {
     next if ($ppp =~ m/^00texlive\./);
@@ -3638,7 +3638,7 @@
   my $is_available = (defined($remtlp) ? 1 : 0);
   if (!($is_installed || $is_available)) {
     # output proper JSON for unavailable packages
-    print "{ \"name\":\"$p\", \"available\":false }\n";
+    print "{ \"name\":\"$p\", \"available\":false }";
     #tlwarn("$prg: package $p not found neither locally nor remote!\n");
     #return($F_WARNING);
     return($F_OK);
@@ -3652,7 +3652,7 @@
                           lrev      => ($is_installed ? $loctlp->revision : 0),
                           rrev      => ($is_available ? $remtlp->revision : 0),
                           revision  => undef);
-  print $str, "\n";
+  print $str;
   return($F_OK);
 }
 



More information about the tex-live-commits mailing list