Skip to content

Commit

Permalink
Fix parsing texdoc -c --help etc. (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgkurtz committed Feb 2, 2025
1 parent 952b5f4 commit 4ee0fe2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions script/texdoclib-cli.tlu
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ local function getopt(arg, options)
end

-- check the existence of an argument
if not tmp then
if not tmp or tmp:match('^%-') then
err_print('error',
'Option -%s requires an argument.', jopt)
os.exit(C.exit_error)
end

if tmp:match('^%-') then
table.insert(tab, {jopt, false})
else
table.insert(tab, {jopt, tmp})
end
Expand Down

0 comments on commit 4ee0fe2

Please sign in to comment.