Skip to content

Commit 804d055

Browse files
committed
Warn about using curl
1 parent 2cc7b24 commit 804d055

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
@@ -10,6 +10,7 @@ use sha2::Sha256;
1010
use thiserror::Error;
1111
#[cfg(any(feature = "reqwest-rustls-tls", feature = "reqwest-native-tls"))]
1212
use tracing::info;
13+
use tracing::warn;
1314
use url::Url;
1415

1516
use crate::{errors::RustupError, process::Process, utils::Notification};
@@ -120,8 +121,14 @@ async fn download_file_(
120121

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

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

0 commit comments

Comments
 (0)