Parcourir la source

Adapt to hex_core's deprecation warnings (II)

pull/2412/head
Paulo F. Oliveira il y a 4 ans
Parent
révision
8390ef348c
1 fichiers modifiés avec 2 ajouts et 3 suppressions
  1. +2
    -3
      src/rebar_pkg_resource.erl

+ 2
- 3
src/rebar_pkg_resource.erl Voir le fichier

@ -29,10 +29,9 @@
-spec init(atom(), rebar_state:t()) -> {ok, rebar_resource_v2:resource()}.
init(Type, State) ->
{ok, Vsn} = application:get_key(rebar, vsn),
BaseConfig = #{http_adapter => r3_hex_http_httpc,
BaseConfig = #{http_adapter => {r3_hex_http_httpc, #{profile => rebar}},
http_user_agent_fragment =>
<<"(rebar3/", (list_to_binary(Vsn))/binary, ") (httpc)">>,
http_adapter_config => #{profile => rebar}},
<<"(rebar3/", (list_to_binary(Vsn))/binary, ") (httpc)">>},
Repos = rebar_hex_repos:from_state(BaseConfig, State),
Resource = rebar_resource_v2:new(Type, ?MODULE, #{repos => Repos,
base_config => BaseConfig}),

Chargement…
Annuler
Enregistrer