diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-04-04 14:11:01 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-04-04 14:11:01 +0200 |
commit | 64f6e8fc0c6cb9254a6fe3db0b4ab31c51cf8524 (patch) | |
tree | 1b36a0b35f5b6d516d27fe817a27249d4c6d9c78 /tex/context/base/mkiv/util-env.lua | |
parent | 70a938c4934f042face9805fc4c392c0676b11d5 (diff) | |
download | context-64f6e8fc0c6cb9254a6fe3db0b4ab31c51cf8524.tar.gz |
2019-04-04 13:38:00
Diffstat (limited to 'tex/context/base/mkiv/util-env.lua')
-rw-r--r-- | tex/context/base/mkiv/util-env.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/util-env.lua b/tex/context/base/mkiv/util-env.lua index cadfb7ac5..dde765874 100644 --- a/tex/context/base/mkiv/util-env.lua +++ b/tex/context/base/mkiv/util-env.lua @@ -150,8 +150,11 @@ environment.sortedflags = nil -- context specific arguments (in order not to confuse the engine) function environment.initializearguments(arg) - local arguments, files = { }, { } - environment.arguments, environment.files, environment.sortedflags = arguments, files, nil + local arguments = { } + local files = { } + environment.arguments = arguments + environment.files = files + environment.sortedflags = nil for index=1,#arg do local argument = arg[index] if index > 0 then @@ -170,6 +173,11 @@ function environment.initializearguments(arg) end end end + if not environment.ownname then + if os.selfpath and os.selfname then + environment.ownname = file.addsuffix(file.join(os.selfpath,os.selfname),"lua") + end + end environment.ownname = file.reslash(environment.ownname or arg[0] or 'unknown.lua') end |