Skip to content

Commit 4ee0fe2

Browse files
committed
Fix parsing texdoc -c --help etc. (#121)
1 parent 952b5f4 commit 4ee0fe2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

script/texdoclib-cli.tlu

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,10 @@ local function getopt(arg, options)
5858
end
5959

6060
-- check the existence of an argument
61-
if not tmp then
61+
if not tmp or tmp:match('^%-') then
6262
err_print('error',
6363
'Option -%s requires an argument.', jopt)
6464
os.exit(C.exit_error)
65-
end
66-
67-
if tmp:match('^%-') then
68-
table.insert(tab, {jopt, false})
6965
else
7066
table.insert(tab, {jopt, tmp})
7167
end

0 commit comments

Comments
 (0)