mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 01:51:14 -03:00
Fix regression causing build/fish to use wrong config paths
Commit 8b102f2571 (Stop using Cargo's OUT_DIR,
2025-06-22) accidentally removed canonicalization of
FISH_BUILD_DIR=${CMAKE_BINARY_DIR}. This means that if the path to
${CMAKE_BINARY_DIR} includes a symlink, ${CMAKE_BINARY_DIR}/fish will
wrongly use /usr/share/fish instead of ${CARGO_MANIFEST_DIR}/share.
Fix this and reintroduce the comment.
This commit is contained in:
8
build.rs
8
build.rs
@@ -13,10 +13,14 @@ fn main() {
|
||||
|
||||
let cargo_target_dir = fish_build_helper::get_target_dir();
|
||||
|
||||
// FISH_BUILD_DIR is set by CMake, if we are using it.
|
||||
rsconf::set_env_value(
|
||||
"FISH_BUILD_DIR",
|
||||
option_env!("FISH_BUILD_DIR").unwrap_or(cargo_target_dir.to_str().unwrap()),
|
||||
// This is set by CMake and might include symlinks. Since we want to compare this to
|
||||
// the dir fish is executed in we need to canonicalize it.
|
||||
option_env!("FISH_BUILD_DIR")
|
||||
.map_or(cargo_target_dir, fish_build_helper::canonicalize)
|
||||
.to_str()
|
||||
.unwrap(),
|
||||
);
|
||||
|
||||
// We need to canonicalize (i.e. realpath) the manifest dir because we want to be able to
|
||||
|
||||
Reference in New Issue
Block a user