Explorar el Código

[#149002995] stop eating edoc path config

be a little smarter when generating edocs; loof for some
sort of doc path and then replace w/e was there with the
updated doc paths
pull/1589/head
Sam Sawan hace 8 años
padre
commit
d09aaed77d
Se han modificado 1 ficheros con 5 adiciones y 6 borrados
  1. +5
    -6
      src/rebar_prv_edoc.erl

+ 5
- 6
src/rebar_prv_edoc.erl Ver fichero

@ -84,9 +84,8 @@ format_error(Reason) ->
has_configured_paths(EdocOpts) ->
proplists:get_value(dir, EdocOpts) =/= undefined.
add_to_paths([], Path) ->
[{doc_path, [Path]}];
add_to_paths([{doc_path, Paths}|T], Path) ->
[{doc_path, [Path | Paths]} | T];
add_to_paths([H|T], Path) ->
[H | add_to_paths(Path, T)].
add_to_paths(Opts, Path) ->
case proplists:get_value(doc_path, Opts) of
undefined -> [{doc_path, [Path]} | Opts];
Paths -> lists:keyreplace(doc_path, 1, Opts, {doc_path, [Path | Paths]})
end.

Cargando…
Cancelar
Guardar