diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-09-21 21:43:12 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-09-21 21:43:12 +0200 |
commit | f7ee609d470a08a16e5cdaad14582fc8ed993c5e (patch) | |
tree | 56f85523ff7b19d926d026f470bb2c75d192e23b /scripts/context/lua/mtx-context.lua | |
parent | 772472f057060460c83828cf7fd1631298165e37 (diff) | |
download | context-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.lua | 9 |
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 |