Skip to content

Commit 71ccd53

Browse files
committed
feat(self-update): log RUSTUP_DIST_* if it's set
1 parent 3bbbb9e commit 71ccd53

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/config.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,17 @@ impl Cfg {
226226
.transpose()?;
227227

228228
let dist_root_server = match process().var("RUSTUP_DIST_SERVER") {
229-
Ok(ref s) if !s.is_empty() => s.clone(),
229+
Ok(ref s) if !s.is_empty() => {
230+
debug!("`RUSTUP_DIST_SERVER` has been set to `{s}`");
231+
s.clone()
232+
}
230233
_ => {
231234
// For backward compatibility
232235
process()
233236
.var("RUSTUP_DIST_ROOT")
234237
.ok()
235238
.and_then(utils::if_not_empty)
239+
.inspect(|url| debug!("`RUSTUP_DIST_ROOT` has been set to `{url}`"))
236240
.map_or(Cow::Borrowed(dist::DEFAULT_DIST_ROOT), Cow::Owned)
237241
.as_ref()
238242
.trim_end_matches("/dist")

0 commit comments

Comments
 (0)