@@ -269,10 +269,10 @@ impl DownloadStatus {
269269
270270 pub ( crate ) fn finished ( & self ) {
271271 self . progress . set_style (
272- ProgressStyle :: with_template ( "{msg:>12.bold} downloaded {total_bytes} in {elapsed} " )
272+ ProgressStyle :: with_template ( "{msg:>12.bold} pending installation " )
273273 . unwrap ( ) ,
274274 ) ;
275- self . progress . finish ( ) ;
275+ self . progress . tick ( ) ; // A tick is needed for the new style to appear, as it is static.
276276 }
277277
278278 pub ( crate ) fn failed ( & self ) {
@@ -285,8 +285,27 @@ impl DownloadStatus {
285285
286286 pub ( crate ) fn retrying ( & self ) {
287287 * self . retry_time . lock ( ) . unwrap ( ) = Some ( Instant :: now ( ) ) ;
288- self . progress
289- . set_style ( ProgressStyle :: with_template ( "{msg:>12.bold} retrying download" ) . unwrap ( ) ) ;
288+ self . progress . set_style (
289+ ProgressStyle :: with_template ( "{msg:>12.bold} retrying download..." ) . unwrap ( ) ,
290+ ) ;
291+ }
292+
293+ pub ( crate ) fn installing ( & self ) {
294+ self . progress . set_style (
295+ ProgressStyle :: with_template (
296+ "{msg:>12.bold} installing {spinner:.green}" ,
297+ )
298+ . unwrap ( )
299+ . tick_chars ( r"|/-\ " ) ,
300+ ) ;
301+ self . progress . enable_steady_tick ( Duration :: from_millis ( 100 ) ) ;
302+ }
303+
304+ pub ( crate ) fn installed ( & self ) {
305+ self . progress . set_style (
306+ ProgressStyle :: with_template ( "{msg:>12.bold} installed" ) . unwrap ( ) ,
307+ ) ;
308+ self . progress . finish ( ) ;
290309 }
291310}
292311
0 commit comments