File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -562,10 +562,12 @@ impl CliFactory {
562
562
self . text_only_progress_bar ( ) . clone ( ) ,
563
563
) ) ,
564
564
match resolver_factory. npm_resolver ( ) ?. as_managed ( ) {
565
- Some ( managed_npm_resolver) => Arc :: new (
566
- DenoTaskLifeCycleScriptsExecutor :: new ( managed_npm_resolver. clone ( ) ) ,
567
- )
568
- as Arc < dyn LifecycleScriptsExecutor > ,
565
+ Some ( managed_npm_resolver) => {
566
+ Arc :: new ( DenoTaskLifeCycleScriptsExecutor :: new (
567
+ managed_npm_resolver. clone ( ) ,
568
+ self . text_only_progress_bar ( ) . clone ( ) ,
569
+ ) ) as Arc < dyn LifecycleScriptsExecutor >
570
+ }
569
571
None => Arc :: new ( NullLifecycleScriptsExecutor ) ,
570
572
} ,
571
573
self . text_only_progress_bar ( ) . clone ( ) ,
Original file line number Diff line number Diff line change @@ -275,6 +275,7 @@ pub enum DenoTaskLifecycleScriptsError {
275
275
}
276
276
277
277
pub struct DenoTaskLifeCycleScriptsExecutor {
278
+ progress_bar : ProgressBar ,
278
279
npm_resolver : ManagedNpmResolverRc < CliSys > ,
279
280
}
280
281
@@ -348,10 +349,7 @@ impl LifecycleScriptsExecutor for DenoTaskLifeCycleScriptsExecutor {
348
349
{
349
350
continue ;
350
351
}
351
- let pb = ProgressBar :: new (
352
- crate :: util:: progress_bar:: ProgressBarStyle :: TextOnly ,
353
- ) ;
354
- let _guard = pb. update_with_prompt (
352
+ let _guard = self . progress_bar . update_with_prompt (
355
353
ProgressMessagePrompt :: Initialize ,
356
354
& format ! ( "{}: running '{script_name}' script" , package. id. nv) ,
357
355
) ;
@@ -444,8 +442,14 @@ impl LifecycleScriptsExecutor for DenoTaskLifeCycleScriptsExecutor {
444
442
}
445
443
446
444
impl DenoTaskLifeCycleScriptsExecutor {
447
- pub fn new ( npm_resolver : ManagedNpmResolverRc < CliSys > ) -> Self {
448
- Self { npm_resolver }
445
+ pub fn new (
446
+ npm_resolver : ManagedNpmResolverRc < CliSys > ,
447
+ progress_bar : ProgressBar ,
448
+ ) -> Self {
449
+ Self {
450
+ npm_resolver,
451
+ progress_bar,
452
+ }
449
453
}
450
454
451
455
// take in all (non copy) packages from snapshot,
You can’t perform that action at this time.
0 commit comments