Skip to content

Commit 8706da7

Browse files
committed
Warn about using curl
1 parent 6b0dde3 commit 8706da7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/download/mod.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use sha2::Sha256;
88
use thiserror::Error;
99
#[cfg(any(feature = "reqwest-rustls-tls", feature = "reqwest-native-tls"))]
1010
use tracing::info;
11+
use tracing::warn;
1112
use url::Url;
1213

1314
use crate::{errors::RustupError, process::Process, utils::Notification};
@@ -118,8 +119,14 @@ async fn download_file_(
118119

119120
// Keep the curl env var around for a bit
120121
let use_curl_backend = process.var_os("RUSTUP_USE_CURL").map(|it| it != "0");
121-
let use_rustls = process.var_os("RUSTUP_USE_RUSTLS").map(|it| it != "0");
122+
if use_curl_backend == Some(true) {
123+
warn!(
124+
"RUSTUP_USE_CURL is set; the curl backend is deprecated, please file an issue if the \
125+
default download backend does not work for your use case"
126+
);
127+
}
122128

129+
let use_rustls = process.var_os("RUSTUP_USE_RUSTLS").map(|it| it != "0");
123130
let backend = match (use_curl_backend, use_rustls) {
124131
// If environment specifies a backend that's unavailable, error out
125132
#[cfg(not(feature = "reqwest-rustls-tls"))]

0 commit comments

Comments
 (0)