From 170e4916cf33baaaaef427e87f1e7458ea983d1b Mon Sep 17 00:00:00 2001 From: Andreas Matthias Date: Thu, 13 Feb 2025 20:01:23 +0100 Subject: [PATCH] fix: incorrect error message for `--doc-update`. --- changelog.md | 1 + script/cli/doc/init.lua | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 454301b2e..46e9ceebb 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`. ## 3.13.6 `2025-2-6` diff --git a/script/cli/doc/init.lua b/script/cli/doc/init.lua index 3492b3d9c..93ddc40de 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