Skip to content

Commit db0633e

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 db0633e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument
6+
* `CHG` default path for `--doc_out_path` is the current directory
67

78
## 3.13.6
89
`2025-2-6`

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)