mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
Embedded builds to use $workspace_root/etc again if run from build dir
Commit f05ad46980 (config_paths: remove vestiges of installable
builds, 2025-09-06) removed a bunch of code paths for embed-data
builds, since those builds can do without most config paths.
However they still want the sysconfig path. That commit made
embedded builds use "/etc/fish" unconditionally. Previously they
used "$workspace_root/etc". This is important when running tests,
which should not read /etc/fish.
tests/checks/invocation.fish tests this implicitly: if /etc/fish does
not exist, then
fish --profile-startup /dev/stdout
will not contain "builtin source".
Let's restore historical behavior. This might be annoying for users
who "install" with "ln -s target/debug/fish ~/bin/", but that hasn't
ever been recommended, and the historical behavior was in effect
until 4.1.0.
Fixes #11900
This commit is contained in:
12
tests/checks/config-paths-standalone.fish
Normal file
12
tests/checks/config-paths-standalone.fish
Normal file
@@ -0,0 +1,12 @@
|
||||
# RUN: %fish -d config | grep -v ^Debug.enabled
|
||||
# REQUIRES: %fish -c 'status build-info' | grep '^Features:.*embed-data'
|
||||
|
||||
# CHECKERR: config: executable path: {{.*}}/fish
|
||||
# CHECKERR: config: embed-data feature is active, ignoring data paths
|
||||
|
||||
# NOTE: When our executable is located outside the workspace, this is "/etc".
|
||||
# CHECKERR: config: paths.sysconf: {{.+}}/etc
|
||||
|
||||
# CHECKERR: config: paths.bin: {{.*}}
|
||||
# CHECKERR: config: sourcing /home/johannes/git/fish-shell/etc/config.fish
|
||||
# CHECKERR: config: not sourcing {{.*}}/xdg_config_home/fish/config.fish (not readable or does not exist)
|
||||
Reference in New Issue
Block a user