diff options
author | Dominik Xaver Hörl <hoe.dom@gmx.de> | 2020-12-20 14:42:30 +0100 |
---|---|---|
committer | Cole Helbling <cole.e.helbling@outlook.com> | 2021-02-17 11:31:29 -0800 |
commit | cf3e8a7352ebcc83b45c800c9e3ca759804b2676 (patch) | |
tree | f2390308dfdc14e6d1b7c7baedad8974486448fd /pkgs/shells | |
parent | 7ab270206fb0899d07dcc0ae1e0cc3d9bef98b63 (diff) |
fish: avoid nontermination in fhs like setups
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/fish/default.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 7e38d9dec3a1..e36e32d043f8 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -56,8 +56,12 @@ let # source both, but source the more global configuration files earlier # than the more local ones, so that more local configurations inherit # from but override the more global locations. + # + # Special care needs to be taken, when fish is called from an FHS user env + # or similar setup, because this configuration file will then be relocated + # to /etc/fish/config.fish, so we test for this case to avoid nontermination. - if test -f /etc/fish/config.fish + if test -f /etc/fish/config.fish && test /etc/fish/config.fish != (status filename) source /etc/fish/config.fish end |