summaryrefslogtreecommitdiff
path: root/script/cli
diff options
context:
space:
mode:
authorRebecca Turner <rbt@sent.as>2023-10-10 13:23:29 -0700
committerRebecca Turner <rbt@sent.as>2023-10-10 13:23:29 -0700
commit00ad081732cfd1dc7e340597f2000de751960471 (patch)
treec2df4380a658d2e92b7eaf1b42f8ac8470f12cf7 /script/cli
parentadde1d0a5001de44c8ee331f671668d509e23ce2 (diff)
downloadlua-language-server-00ad081732cfd1dc7e340597f2000de751960471.zip
Add `--check_out_path` CLI argument
This allows customizing where the diagnostic JSON file is saved.
Diffstat (limited to 'script/cli')
-rw-r--r--script/cli/check.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/cli/check.lua b/script/cli/check.lua
index 323ea74b..4295fa06 100644
--- a/script/cli/check.lua
+++ b/script/cli/check.lua
@@ -99,7 +99,10 @@ end
if count == 0 then
print(lang.script('CLI_CHECK_SUCCESS'))
else
- local outpath = LOGPATH .. '/check.json'
+ local outpath = CHECK_OUT_PATH
+ if outpath == nil then
+ outpath = LOGPATH .. '/check.json'
+ end
util.saveFile(outpath, jsonb.beautify(results))
print(lang.script('CLI_CHECK_RESULTS', count, outpath))