[Bug] TeX Live Installer removing User PATH entries on Windows 10

Norbert Preining norbert at preining.info
Fri Aug 2 10:50:40 CEST 2024


Hi Laurin,

thanks for the report, interesting that nobody has reported this since
ages.

Also, from the code, it doesn't seem like this should happen.

Could you do the following:
* get a current installer
* unpack it
* change tlpkg/TeXLive/TLWinGoo.pm as follows:

diff --git a/Master/tlpkg/TeXLive/TLWinGoo.pm b/Master/tlpkg/TeXLive/TLWinGoo.pm
index e7076aea7ee..9251190c6c9 100644
--- a/Master/tlpkg/TeXLive/TLWinGoo.pm
+++ b/Master/tlpkg/TeXLive/TLWinGoo.pm
@@ -463,6 +463,7 @@ sub adjust_reg_path_for_texlive {
   debug("Warning: [pdf]tex program not found in $tlbindir\n")
     if (!is_a_texdir($tlbindir));
   my $path = ($mode eq 'system') ? get_system_path() : get_user_path();
+  debug("TLWinGoo: adjust_reg_path_for_texlive: current path before adjusting = $path\n");
   $tlbindir =~ s!/!\\!g;
   my $tlbindir_short = uc(short_name($tlbindir));
   my ($d, $d_short, @newpath);
@@ -490,7 +491,7 @@ sub adjust_reg_path_for_texlive {
     }
   }
   if (@newpath) {
-    debug("TLWinGoo: adjust_reg_path_for_texlive: calling setenv_reg in $mode\n");
+    debug("TLWinGoo: adjust_reg_path_for_texlive: calling setenv_reg in $mode with new path = ", join(';', @newpath), "\n");
     setenv_reg("Path", join(';', @newpath), $mode);
   } else {
     debug("TLWinGoo: adjust_reg_path_for_texlive: calling unsetenv_reg in $mode\n");


That is:
- add one debug line (first line with + starting, but don't include the
  + itself
- change the debug line (from - to +)

* Then run the installer with 
	./install-tl -v ...

That should output a lot of things, but also the above 
	TLWinGoo: adjust_reg_path.....
with the old path and the new path.

You can also just send me the full debug output.

Thanks

Norbert

On Thu, 01 Aug 2024, Laurin wrote:
> After installation almost all user PATH variables were removed. The only
> remaining ones were the latest TeX Live installation directory and one
> previous entry that was already there before the installation.

--
PREINING Norbert                              https://www.preining.info
arXiv / Cornell University   +   IFMGA Guide   +   TU Wien  +  TeX Live
GPG: 0x860CDC13   fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13


More information about the tex-live mailing list.