Skip to content

Commit 607d8e5

Browse files
committed
Find current library from input rather than output
1 parent b862d64 commit 607d8e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/odoc/bin/main.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,8 @@ end = struct
713713
| Some _ as r -> Ok r
714714
| None -> Error `Not_found)
715715

716-
let current_library_of_output lib_roots output =
717-
match find_root_of_output lib_roots output with
716+
let current_library_of_input lib_roots input =
717+
match find_root_of_output lib_roots input with
718718
| Ok _ as ok -> ok
719719
| Error `Not_found ->
720720
Error (`Msg "The output file must be part of a directory passed as -L")
@@ -768,7 +768,7 @@ end = struct
768768
else Ok ())
769769
>>= fun () ->
770770
let is_page = is_page input in
771-
(if is_page then Ok None else current_library_of_output lib_roots output)
771+
(if is_page then Ok None else current_library_of_input lib_roots input)
772772
>>= fun current_lib ->
773773
(if is_page then current_package_of_page ~current_package page_roots output
774774
else validate_current_package page_roots current_package)

0 commit comments

Comments
 (0)