Skip to content

Commit 9bded09

Browse files
fix: default path for --doc_out_path is the current directory
Back then the default path of doc.json was LOGPATH. However the default path got lost after a refactoring in LuaLS#2821. This commit reimplements the default path, but changes the default to the current directory.
1 parent 115a518 commit 9bded09

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

script/cli/doc/init.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ function doc.runCLI()
242242
end)
243243
io.write('\x0D')
244244

245+
if not DOC_OUT_PATH then
246+
DOC_OUT_PATH = fs.current_path():string()
247+
end
248+
245249
local ok, outPaths, err = dirty_export.serializeAndExport(docs, DOC_OUT_PATH)
246250
print(lang.script('CLI_DOC_DONE'))
247251
for i, path in ipairs(outPaths) do

0 commit comments

Comments
 (0)