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.
This commit is contained in:
Johannes Altmanninger
2025-09-13 10:23:35 +02:00
parent deabcf5478
commit e9595d4817

View File

@@ -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() {