Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions plugins/api/api_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ module Cmdline = struct
let open Api_options in
match o.api_to_add, o.api_to_rem with
| [],[] -> ()
| add,rem ->
| _add,_rem ->
let paths = all_paths o in
add_files o.api_to_add paths;
rem_files o.api_to_rem paths;
Expand All @@ -381,10 +381,17 @@ module Cmdline = struct
dispatch_flags o;
Project.register_pass ~autorun:true ~deps:["abi"] (main paths)

let normalize_paths ps =
let norm p =
if String.equal p "." then Sys.getcwd ()
else p in
List.map ~f:norm ps

let () =
Config.manpage man;
Config.when_ready (fun {Config.get=(!)} ->
let paths = normalize_paths !path in
let o = create !add_api !remove_api
!list_paths !show_apis !path in
!list_paths !show_apis paths in
dispatch o)
end