From b3238c8c8d8f96bfa83ba46fd6ae1c7afb84bd90 Mon Sep 17 00:00:00 2001 From: Ahmed Farghal Date: Fri, 26 Apr 2024 15:44:42 +0100 Subject: [PATCH] Removing unnecessary chdir --- crates/types/src/config/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/types/src/config/mod.rs b/crates/types/src/config/mod.rs index 1dedb2d7f..ccfc6a016 100644 --- a/crates/types/src/config/mod.rs +++ b/crates/types/src/config/mod.rs @@ -100,12 +100,7 @@ pub fn set_current_config(config: Configuration) { // todo: potentially validate the config CONFIGURATION.store(Arc::new(config)); #[cfg(not(any(test, feature = "test-util")))] - NODE_BASE_DIR.get_or_init(|| { - if let Err(e) = std::env::set_current_dir(&proposed_cwd) { - eprintln!("[WARN] Failed to set current working directory: {}", e); - }; - proposed_cwd - }); + NODE_BASE_DIR.get_or_init(|| proposed_cwd); notify_config_update(); }