@@ -210,11 +210,11 @@ store_etag_in_cache(Path, ETag) ->
210210 UpdateETag :: boolean (),
211211 Res :: ok | {unexpected_hash , integer (), integer ()} | {fetch_fail , binary (), binary ()}
212212 | {bad_registry_checksum , integer (), integer ()} | {error , _ }.
213- cached_download (TmpDir , CachePath , Pkg = {pkg , Name , Vsn , _OldHash , _Hash , RepoConfig }, State , ETag ,
213+ cached_download (TmpDir , CachePath , Pkg = {pkg , Name , Vsn , _OldHash , _Hash , RepoConfig }, _State , ETag ,
214214 ETagPath , UpdateETag ) ->
215- CDN = rebar_state : maybe_default_cdn ( State ),
216- ? DEBUG (" Downloading package ~ts from repo ~ts " , [Name , CDN ]),
217- case request (RepoConfig #{ repo_url => CDN } , Name , Vsn , ETag ) of
215+ RepoUrl = maps : get ( repo_url , RepoConfig , undefined ),
216+ ? DEBUG (" Downloading package ~ts from repo ~ts " , [Name , RepoUrl ]),
217+ case request (RepoConfig , Name , Vsn , ETag ) of
218218 {ok , cached } ->
219219 ? DEBUG (" Version cached at ~ts is up to date, reusing it" , [CachePath ]),
220220 serve_from_cache (TmpDir , CachePath , Pkg );
0 commit comments