From e9595d48175c62d3b9b7d34fac77ff4dcf23e7e6 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 13 Sep 2025 10:23:35 +0200 Subject: [PATCH] config_paths: remove dead code trying to handle in-tree CMake builds Assuming every in-tree build uses CMake, the source tree must also be a valid build directory, so we already return in the env!("FISH_BUILD_DIR") code path above. --- src/env/config_paths.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/env/config_paths.rs b/src/env/config_paths.rs index e5d4e58e5..b36a20347 100644 --- a/src/env/config_paths.rs +++ b/src/env/config_paths.rs @@ -71,23 +71,6 @@ bin: Some(base_path.join("bin")), locale, } - } else if exec_path.ends_with("fish") { - FLOG!( - config, - "'fish' not in a 'bin/', trying paths relative to source tree" - ); - let base_path = exec_path.parent().unwrap(); - #[cfg(feature = "embed-data")] - let data_dir = base_path.join("share/install"); - #[cfg(not(feature = "embed-data"))] - let data_dir = base_path.join("share"); - paths = ConfigPaths { - data: Some(data_dir.clone()), - sysconf: base_path.join("etc"), - doc: base_path.join("user_doc/html"), - bin: Some(base_path.to_path_buf()), - locale: Some(data_dir.join("locale")), - } } if paths.data.clone().is_some_and(|x| x.exists()) && paths.sysconf.exists() {