Skip to content

Commit

Permalink
use cache urls from opam config
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Nov 9, 2022
1 parent 8c3d0cc commit e4744ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/opam.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ let pull_tree_with_cache' ~cache_dir ~url ~hashes ~dir =
(* Opam requires a label for the pull, it's only used for logging *)
let opam_dir = OpamFilename.Dir.of_string dir_str in
let open OpamProcess.Job.Op in
OpamRepository.pull_tree ~cache_dir label opam_dir hashes [ url ] @@| function
let cache_urls = OpamFile.Config.dl_cache global_state.config in
OpamRepository.pull_tree ~cache_urls ~cache_dir label opam_dir hashes [ url ] @@| function
| Result _ | Up_to_date _ -> Ok ()
| Not_available (_, long_msg) ->
Error (`Msg (Printf.sprintf "Failed to pull %s: %s" label long_msg))
Expand Down

0 comments on commit e4744ff

Please sign in to comment.