mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 03:51:14 -03:00
config_paths: fix compiled-in locale dir for installed, non-embed builds
Commitbf65b9e3a7(Change `gettext` paths to be relocatable (#11195), 2025-03-30) broke the locale path. Commitc3740b85be(config_paths: fix compiled-in locale dir, 2025-06-12) fixed what it calls "case 4", but "case 2" is also affected; fix that. Before/after: $ ~/.local/opt/fish/bin/fish -d config paths.locale: /home/johannes/.local/opt/fish/share/fish/locale $ ~/.local/opt/fish/bin/fish -d config paths.locale: /home/johannes/.local/opt/fish/share/locale See https://github.com/fish-shell/fish-shell/issues/11683#issuecomment-3218190662 (cherry picked from commit21a07f08a3)
This commit is contained in:
3
src/env/config_paths.rs
vendored
3
src/env/config_paths.rs
vendored
@@ -64,7 +64,8 @@ fn determine_config_directory_paths(argv0: impl AsRef<Path>) -> ConfigPaths {
|
||||
let data = base_path.join("share/fish/install");
|
||||
#[cfg(not(feature = "installable"))]
|
||||
let data = base_path.join("share/fish");
|
||||
let locale = Some(data.join("locale"));
|
||||
let locale =
|
||||
(!cfg!(feature = "installable")).then(|| base_path.join("share/locale"));
|
||||
paths = ConfigPaths {
|
||||
// One obvious path is ~/.local (with fish in ~/.local/bin/).
|
||||
// If we picked ~/.local/share/fish as our data path,
|
||||
|
||||
Reference in New Issue
Block a user