summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/grph-fil.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-07-23 19:46:04 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-07-23 19:46:04 +0200
commitc73351bc5e590d5a7ebd2b0f13f895a447d25794 (patch)
tree4e2028329e2c0b63a7818463918397de328d6432 /tex/context/base/mkiv/grph-fil.lua
parented85eb918354b77672bbe347c2afcfe2e0b6b7fb (diff)
downloadcontext-c73351bc5e590d5a7ebd2b0f13f895a447d25794.tar.gz
2021-07-23 18:53:00
Diffstat (limited to 'tex/context/base/mkiv/grph-fil.lua')
-rw-r--r--tex/context/base/mkiv/grph-fil.lua15
1 files changed, 14 insertions, 1 deletions
diff --git a/tex/context/base/mkiv/grph-fil.lua b/tex/context/base/mkiv/grph-fil.lua
index b39807830..e40420125 100644
--- a/tex/context/base/mkiv/grph-fil.lua
+++ b/tex/context/base/mkiv/grph-fil.lua
@@ -42,13 +42,20 @@ end
job.register('job.files.collected', tobesaved, initializer)
+-- When there is a runpath specified, we're already there, so then we only need to
+-- pass the orginal path. But we pass it because it will prevent prepending the
+-- current direction to the given name.
+
local runner = sandbox.registerrunner {
name = "hashed context run",
program = "context",
- template = [[%options% %filename%]],
+ template = [[%options% --path=%path% %filename%]],
+ template = [[%options% %?path: --path=%path% ?% %?runpath: --runpath=%runpath% ?% %filename%]],
checkers = {
options = "string",
filename = "readable",
+ path = "string",
+ runpath = "string",
}
}
@@ -90,7 +97,13 @@ function jobfiles.run(name,action)
-- can be anything but we assume it gets checked by the sandbox
os.execute(action)
elseif ta == "table" then
+ local path = action.path
+ local runpath = action.runpath
+ action.path = environment.arguments.path
+ action.runpath = environment.arguments.runpath
runner(action)
+ action.path = path
+ action.runpath = runpath
else
report_run("processing file, no action given for processing %a",name)
end