mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 15:01:16 -03:00
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:
17
src/env/config_paths.rs
vendored
17
src/env/config_paths.rs
vendored
@@ -71,23 +71,6 @@
|
|||||||
bin: Some(base_path.join("bin")),
|
bin: Some(base_path.join("bin")),
|
||||||
locale,
|
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() {
|
if paths.data.clone().is_some_and(|x| x.exists()) && paths.sysconf.exists() {
|
||||||
|
|||||||
Reference in New Issue
Block a user