@@ -687,7 +687,7 @@ end = struct
687
687
open Or_error
688
688
689
689
(* * Find the package/library name the output is part of *)
690
- let find_root_of_output l o =
690
+ let find_root_of_input l o =
691
691
let l =
692
692
List. map
693
693
~f: (fun (x , p ) ->
@@ -714,7 +714,7 @@ end = struct
714
714
| None -> Error `Not_found )
715
715
716
716
let current_library_of_input lib_roots input =
717
- match find_root_of_output lib_roots input with
717
+ match find_root_of_input lib_roots input with
718
718
| Ok _ as ok -> ok
719
719
| Error `Not_found ->
720
720
Error (`Msg " The output file must be part of a directory passed as -L" )
@@ -744,8 +744,8 @@ end = struct
744
744
| _ -> Ok current_package)
745
745
| None -> Ok detected_package
746
746
747
- let current_package_of_page ~current_package page_roots output =
748
- match find_root_of_output page_roots output with
747
+ let current_package_of_page ~current_package page_roots input =
748
+ match find_root_of_input page_roots input with
749
749
| Ok detected_package ->
750
750
validate_current_package ?detected_package page_roots current_package
751
751
| Error `Not_found ->
@@ -770,7 +770,7 @@ end = struct
770
770
let is_page = is_page input in
771
771
(if is_page then Ok None else current_library_of_input lib_roots input)
772
772
>> = fun current_lib ->
773
- (if is_page then current_package_of_page ~current_package page_roots output
773
+ (if is_page then current_package_of_page ~current_package page_roots input
774
774
else validate_current_package page_roots current_package)
775
775
>> = fun current_package ->
776
776
let current_dir = Fs.File. dirname output in
0 commit comments