Skip to content

Commit dea2bf4

Browse files
committed
Warn about using curl
1 parent 336a9b9 commit dea2bf4

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
@@ -14,6 +14,7 @@ use sha2::Sha256;
1414
use thiserror::Error;
1515
#[cfg(any(feature = "reqwest-rustls-tls", feature = "reqwest-native-tls"))]
1616
use tracing::info;
17+
use tracing::warn;
1718
use url::Url;
1819

1920
use crate::{errors::RustupError, process::Process, utils::Notification};
@@ -124,8 +125,14 @@ async fn download_file_(
124125

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

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

0 commit comments

Comments
 (0)