diff --git a/changelog.md b/changelog.md index 36c099f12..c2b25bdca 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,7 @@ ## Unreleased * `FIX` incorrect argument skip pattern for `--check_out_path=`, which incorrectly skips the next argument +* `FIX` incorrect error message for `--doc_update`. * `FIX` reimplement section `luals.config` in file doc.json * `FIX` incorrect file names in file doc.json * `FIX` remove extra `./` path prefix in the check report when using `--check=.` diff --git a/script/cli/doc/init.lua b/script/cli/doc/init.lua index afb4e4da0..0db36771c 100644 --- a/script/cli/doc/init.lua +++ b/script/cli/doc/init.lua @@ -16,7 +16,7 @@ local doc = {} local function findDocJson() local doc_json_path if type(DOC_UPDATE) == 'string' then - doc_json_path = fs.absolute(fs.path(DOC_UPDATE)) .. '/doc.json' + doc_json_path = fs.canonical(fs.path(DOC_UPDATE)) .. '/doc.json' else doc_json_path = fs.current_path() .. '/doc.json' end @@ -46,7 +46,7 @@ local function getPathDocUpdate() local doc_json_dir = doc_json_path:string():gsub('/doc.json', '') return doc_json_dir, doc_path else - error(string.format('Error: Cannot update "%s".', doc_json_path .. '/doc.json')) + error(string.format('Error: Cannot update "%s".', doc_json_path)) end end