Skip to content

Commit

Permalink
Merge PR #19036: Fix coqdoc handling of empty logical path
Browse files Browse the repository at this point in the history
Reviewed-by: proux01
Co-authored-by: proux01 <proux01@users.noreply.github.com>
  • Loading branch information
coqbot-app[bot] and proux01 committed May 17, 2024
2 parents 5662ebf + 2f0caa5 commit 21601f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/coqdoc/cmdArgs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ let arg_int f = Arg.Int (fun d -> prefs := f !prefs d)
(* TODO: replace these hacks with Arg.Rest_all, when coq moves to a newer version of OCaml stdlib *)
let arg_path f = Arg.String (fun s ->
if Array.length Sys.argv < !Arg.current + 3 ||
Sys.argv.(!Arg.current + 2).[0] = '-' then
CString.is_prefix "-" Sys.argv.(!Arg.current + 2) then
raise (Arg.Bad ("Two arguments expected: <dir> and <name>"))
else
Arg.current := !Arg.current + 1;
prefs := f !prefs (normalize_path s, Sys.argv.(!Arg.current + 1)))
let arg_url_path f = Arg.String (fun s ->
if Array.length Sys.argv < !Arg.current + 3 ||
Sys.argv.(!Arg.current + 2).[0] = '-' then
CString.is_prefix "-" Sys.argv.(!Arg.current + 2) then
raise (Arg.Bad ("Two arguments expected: <url> and <path>"))
else
Arg.current := !Arg.current + 1;
Expand Down

0 comments on commit 21601f5

Please sign in to comment.