summaryrefslogtreecommitdiff
path: root/scripts/context/lua/mtx-context.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-09-21 21:43:12 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-09-21 21:43:12 +0200
commitf7ee609d470a08a16e5cdaad14582fc8ed993c5e (patch)
tree56f85523ff7b19d926d026f470bb2c75d192e23b /scripts/context/lua/mtx-context.lua
parent772472f057060460c83828cf7fd1631298165e37 (diff)
downloadcontext-f7ee609d470a08a16e5cdaad14582fc8ed993c5e.tar.gz
2017-09-21 21:10:00
Diffstat (limited to 'scripts/context/lua/mtx-context.lua')
-rw-r--r--scripts/context/lua/mtx-context.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/context/lua/mtx-context.lua b/scripts/context/lua/mtx-context.lua
index 02d942eb0..c02b1a012 100644
--- a/scripts/context/lua/mtx-context.lua
+++ b/scripts/context/lua/mtx-context.lua
@@ -755,7 +755,10 @@ function scripts.context.run(ctxdata,filename)
if formatfile and scriptfile then
local suffix = validstring(getargument("suffix"))
local resultname = validstring(getargument("result"))
- if suffix then
+ local resultpath = file.pathpart(resultname)
+ if resultpath ~= "" then
+ resultname = nil
+ elseif suffix then
resultname = removesuffix(jobname) .. suffix
end
local oldbase = ""
@@ -962,6 +965,10 @@ function scripts.context.run(ctxdata,filename)
result_save_keep(oldbase,newbase)
end
report("result renamed to: %s",newbase)
+ elseif resultpath ~= "" then
+ report()
+ report("results are to be on the running path, not on %a, ignoring --result",resultpath)
+ report()
end
--
-- -- needs checking