summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/scripts')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/tlmgr.pl10
1 files changed, 7 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/texlive/tlmgr.pl b/Master/texmf-dist/scripts/texlive/tlmgr.pl
index 7dd33fd6d0d..9354d9f8658 100755
--- a/Master/texmf-dist/scripts/texlive/tlmgr.pl
+++ b/Master/texmf-dist/scripts/texlive/tlmgr.pl
@@ -3617,11 +3617,15 @@ sub show_one_package_json {
my $is_installed = (defined($loctlp) ? 1 : 0);
my $is_available = (defined($remtlp) ? 1 : 0);
if (!($is_installed || $is_available)) {
- tlwarn("$prg: package $p not found neither locally nor remote!\n");
- return($F_WARNING);
+ # output proper JSON for unavailable packages
+ print "{ \"name\":\"$p\", \"available\":false }\n";
+ #tlwarn("$prg: package $p not found neither locally nor remote!\n");
+ #return($F_WARNING);
+ return($F_OK);
}
my $tlp = ($is_installed ? $loctlp : $remtlp);
- my $str = $tlp->as_json();
+ my $str = $tlp->as_json(available => ($is_available ? $JSON::true : $JSON::false),
+ installed => ($is_installed ? $JSON::true : $JSON::false));
print $str, "\n";
return($F_OK);
}