1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(regression): ensure progress information is shown when downloading remote modules (#17069)

This commit is contained in:
David Sherret 2022-12-15 16:23:50 -05:00 committed by GitHub
parent b9527f5020
commit 28cc18b516
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -440,9 +440,9 @@ impl FileFetcher {
.boxed();
}
let mut _maybe_guard = None;
let mut maybe_progress_guard = None;
if let Some(pb) = self.progress_bar.as_ref() {
_maybe_guard = Some(pb.update(specifier.as_str()));
maybe_progress_guard = Some(pb.update(specifier.as_str()));
} else {
log::log!(
self.download_log_level,
@ -463,7 +463,7 @@ impl FileFetcher {
let file_fetcher = self.clone();
// A single pass of fetch either yields code or yields a redirect.
async move {
match fetch_once(
let result = match fetch_once(
&client,
FetchOnceArgs {
url: specifier.clone(),
@ -497,7 +497,9 @@ impl FileFetcher {
file_fetcher.build_remote_file(&specifier, bytes, &headers)?;
Ok(file)
}
}
};
drop(maybe_progress_guard);
result
}
.boxed()
}