mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
'catala depends': allow multiple extensions
This commit is contained in:
parent
619cafebb8
commit
adaaf735e6
@ -396,9 +396,11 @@ module Flags = struct
|
||||
|
||||
let extension =
|
||||
value
|
||||
& opt (some string) None
|
||||
& opt_all string []
|
||||
& info ["extension"; "e"] ~docv:"EXT"
|
||||
~doc:"Replace the original file extensions with $(i,.EXT)."
|
||||
~doc:
|
||||
"Replace the original file extensions with $(i,.EXT). If repeated, \
|
||||
the file will be listed once which each supplied extension."
|
||||
|
||||
let prefix =
|
||||
value
|
||||
|
@ -1053,11 +1053,12 @@ module Commands = struct
|
||||
f)
|
||||
else File.(pfx / f)
|
||||
in
|
||||
let f =
|
||||
File.clean_path
|
||||
@@ match extension with None -> f | Some ext -> File.(f -.- ext)
|
||||
in
|
||||
Format.pp_print_string ppf f)
|
||||
let f = File.clean_path f in
|
||||
if extension = [] then Format.pp_print_string ppf f
|
||||
else
|
||||
Format.pp_print_list ~pp_sep:Format.pp_print_space
|
||||
(fun ppf ext -> Format.pp_print_string ppf File.(f -.- ext))
|
||||
ppf extension)
|
||||
Format.std_formatter modules_list_topo;
|
||||
Format.close_box ();
|
||||
Format.print_newline ()
|
||||
|
Loading…
Reference in New Issue
Block a user