diff options
Diffstat (limited to 'Master/texmf')
-rwxr-xr-x | Master/texmf/scripts/texlive/texconf.tlu | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Master/texmf/scripts/texlive/texconf.tlu b/Master/texmf/scripts/texlive/texconf.tlu index 3f00b0ee51f..b9cb3f7e934 100755 --- a/Master/texmf/scripts/texlive/texconf.tlu +++ b/Master/texmf/scripts/texlive/texconf.tlu @@ -61,14 +61,16 @@ if (sys) then os.setenv('TEXMFVAR', texmfsysvar) else texmfconfig=kpse.var_value('TEXMFCONFIG') --- workaround for texlua, new kpathsea which expands '~' not --- integrated yet. - if os.type == 'windows' then - home = os.getenv('USERPROFILE') - else - home = os.getenv('HOME') + if string.match(texmfconfig, '^~') then + -- workaround for old texlua, new kpathsea which expands '~' not + -- integrated yet. + if os.type == 'windows' then + home = os.getenv('USERPROFILE') + else + home = os.getenv('HOME') + end + texmfconfig = string.gsub(texmfconfig, '^~', home) end - texmfconfig = string.gsub(texmfconfig, '^~', home) end |