Skip to content

Commit

Permalink
Merge pull request #6304 from kit-ty-kate/curl-macos
Browse files Browse the repository at this point in the history
Make curl the default download tool instead of wget on macOS
  • Loading branch information
kit-ty-kate authored Nov 18, 2024
2 parents d45aa58 + 16a2019 commit 3a11680
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ users)
## Shell

## Internal
* Make `curl` the default download tool instead of `wget` on macOS [#6304 @kit-ty-kate]

## Internal: Windows

Expand Down
1 change: 1 addition & 0 deletions src/client/opamInitDefaults.ml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ let req_dl_tools () =
let msg =
Some "A download tool is required, check env variables OPAMCURL or OPAMFETCH"
in
(* Keep synchronised with [OpamRepositoryConfig.default] *)
let default =
[
["curl"; "wget"], msg, Some not_open_free_bsd_filter;
Expand Down
4 changes: 2 additions & 2 deletions src/repository/opamRepositoryConfig.ml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ type 'a options_fun =
'a

let default = {
(* Keep synchronised with [OpamInitDefaults.req_dl_tools] *)
download_tool = lazy (
let os = OpamStd.Sys.os () in
try
let curl = "curl", `Curl in
let tools =
match os with
| Darwin -> ["wget", `Default; curl]
| FreeBSD -> ["fetch", `Default ; curl]
| FreeBSD -> ["fetch", `Default; curl]
| OpenBSD -> ["ftp", `Default; curl]
| _ -> [curl; "wget", `Default]
in
Expand Down

0 comments on commit 3a11680

Please sign in to comment.