Skip to content

fix: incorrect error message for --doc-update #3075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Unreleased
<!-- Add all new changes here. They will be moved under a version at release -->
* `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=.`
Expand Down
4 changes: 2 additions & 2 deletions script/cli/doc/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down