fix: hide progress bars when showing permission prompt (#17130)

Also adds download bytes progress when downloading remote specifiers.

Closes #16860
This commit is contained in:
David Sherret 2022-12-19 14:31:19 -05:00 committed by GitHub
parent 5a8adc342b
commit 2ff27a1f93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 120 additions and 86 deletions

View file

@ -23,6 +23,7 @@ mod renderer;
// Inspired by Indicatif, but this custom implementation allows
// for more control over what's going on under the hood.
#[derive(Debug)]
pub struct UpdateGuard {
maybe_entry: Option<ProgressBarEntry>,
}
@ -183,7 +184,7 @@ impl ProgressBarInner {
{
internal_state.start_time = SystemTime::now();
internal_state.draw_thread_guard =
Some(DrawThread::add_entry(0, Arc::new(self.clone())));
Some(DrawThread::add_entry(Arc::new(self.clone())));
}
}
}