mirror of
https://github.com/denoland/deno
synced 2024-08-27 03:50:16 +00:00
fix(regression): ensure progress information is shown when downloading remote modules (#17069)
This commit is contained in:
parent
b9527f5020
commit
28cc18b516
|
@ -440,9 +440,9 @@ impl FileFetcher {
|
||||||
.boxed();
|
.boxed();
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut _maybe_guard = None;
|
let mut maybe_progress_guard = None;
|
||||||
if let Some(pb) = self.progress_bar.as_ref() {
|
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 {
|
} else {
|
||||||
log::log!(
|
log::log!(
|
||||||
self.download_log_level,
|
self.download_log_level,
|
||||||
|
@ -463,7 +463,7 @@ impl FileFetcher {
|
||||||
let file_fetcher = self.clone();
|
let file_fetcher = self.clone();
|
||||||
// A single pass of fetch either yields code or yields a redirect.
|
// A single pass of fetch either yields code or yields a redirect.
|
||||||
async move {
|
async move {
|
||||||
match fetch_once(
|
let result = match fetch_once(
|
||||||
&client,
|
&client,
|
||||||
FetchOnceArgs {
|
FetchOnceArgs {
|
||||||
url: specifier.clone(),
|
url: specifier.clone(),
|
||||||
|
@ -497,7 +497,9 @@ impl FileFetcher {
|
||||||
file_fetcher.build_remote_file(&specifier, bytes, &headers)?;
|
file_fetcher.build_remote_file(&specifier, bytes, &headers)?;
|
||||||
Ok(file)
|
Ok(file)
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
drop(maybe_progress_guard);
|
||||||
|
result
|
||||||
}
|
}
|
||||||
.boxed()
|
.boxed()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue