@@ -34,7 +34,7 @@ use ten_rust::pkg_info::{
3434} ;
3535
3636use crate :: {
37- config:: { internal :: TmanInternalConfig , TmanConfig } ,
37+ config:: { is_verbose , metadata :: TmanMetadata , TmanConfig } ,
3838 constants:: { APP_DIR_IN_DOT_TEN_DIR , DOT_TEN_DIR } ,
3939 dep_and_candidate:: get_all_candidates_from_deps,
4040 fs:: { check_is_addon_folder, find_nearest_app_dir} ,
@@ -282,7 +282,7 @@ ten_package("app_for_standalone") {
282282}
283283
284284fn prepare_basic_standalone_app_dir (
285- _tman_config : Arc < TmanConfig > ,
285+ _tman_config : Arc < tokio :: sync :: RwLock < TmanConfig > > ,
286286 extension_dir : & Path ,
287287) -> Result < PathBuf > {
288288 let dot_ten_app_dir =
@@ -314,7 +314,7 @@ fn prepare_basic_standalone_app_dir(
314314
315315/// Prepare the `.ten/app/` folder in the extension standalone mode.
316316async fn prepare_standalone_app_dir (
317- tman_config : Arc < TmanConfig > ,
317+ tman_config : Arc < tokio :: sync :: RwLock < TmanConfig > > ,
318318 extension_dir : & Path ,
319319) -> Result < PathBuf > {
320320 let dot_ten_app_dir =
@@ -330,7 +330,7 @@ async fn prepare_standalone_app_dir(
330330
331331/// Path logic for standalone mode and non-standalone mode.
332332async fn determine_app_dir_to_work_with (
333- tman_config : Arc < TmanConfig > ,
333+ tman_config : Arc < tokio :: sync :: RwLock < TmanConfig > > ,
334334 standalone : bool ,
335335 specified_cwd : & Path ,
336336) -> Result < PathBuf > {
@@ -356,12 +356,12 @@ async fn determine_app_dir_to_work_with(
356356}
357357
358358pub async fn execute_cmd (
359- tman_config : Arc < TmanConfig > ,
360- _tman_internal_config : Arc < TmanInternalConfig > ,
359+ tman_config : Arc < tokio :: sync :: RwLock < TmanConfig > > ,
360+ _tman_metadata : Arc < tokio :: sync :: RwLock < TmanMetadata > > ,
361361 command_data : InstallCommand ,
362362 out : Arc < Box < dyn TmanOutput > > ,
363363) -> Result < ( ) > {
364- if tman_config. verbose {
364+ if is_verbose ( tman_config. clone ( ) ) . await {
365365 out. normal_line ( "Executing install command" ) ;
366366 out. normal_line ( & format ! ( "command_data: {:?}" , command_data) ) ;
367367 out. normal_line ( & format ! ( "tman_config: {:?}" , tman_config) ) ;
@@ -446,7 +446,8 @@ pub async fn execute_cmd(
446446 tman_config. clone ( ) ,
447447 & app_dir_to_work_with,
448448 out. clone ( ) ,
449- ) ?;
449+ )
450+ . await ?;
450451
451452 out. normal_line ( & format ! (
452453 "{} Filter compatible packages..." ,
@@ -459,7 +460,8 @@ pub async fn execute_cmd(
459460 & mut all_compatible_installed_pkgs,
460461 & command_data. support ,
461462 out. clone ( ) ,
462- ) ;
463+ )
464+ . await ?;
463465
464466 if command_data. local_path . is_some ( ) {
465467 // tman install <local_path>
@@ -630,22 +632,23 @@ from manifest-lock.json...",
630632 & all_candidates,
631633 locked_pkgs. as_ref ( ) ,
632634 out. clone ( ) ,
633- ) ?;
635+ )
636+ . await ?;
634637
635638 // If there are answers are found, print out all the answers.
636- if tman_config. verbose {
639+ if is_verbose ( tman_config. clone ( ) ) . await {
637640 out. normal_line ( "\n " ) ;
638641 out. normal_line ( "Result:" ) ;
639642 }
640643
641644 if let Some ( ref usable_model) = usable_model {
642645 for result in usable_model {
643- if tman_config. verbose {
646+ if is_verbose ( tman_config. clone ( ) ) . await {
644647 out. normal_line ( & format ! ( " {:?}" , result) ) ;
645648 }
646649 }
647650 }
648- if tman_config. verbose {
651+ if is_verbose ( tman_config. clone ( ) ) . await {
649652 out. normal_line ( "" ) ;
650653 }
651654
@@ -676,7 +679,7 @@ from manifest-lock.json...",
676679 out. clone ( ) ,
677680 ) ;
678681
679- if has_conflict && !tman_config. assume_yes {
682+ if has_conflict && !tman_config. read ( ) . await . assume_yes {
680683 if out. is_interactive ( ) {
681684 // "y" for continuing to install, "n" for stopping.
682685 let ans = Confirm :: new (
0 commit comments