diff options
| author | Antoine Cotten <hello@acotten.com> | 2024-09-12 17:37:56 +0000 |
|---|---|---|
| committer | Antoine Cotten <hello@acotten.com> | 2024-09-12 17:37:56 +0000 |
| commit | 953d02ba5958df017d9682f727d10a75cb8a0391 (patch) | |
| tree | 57304fa3758e1b0e299db02e6602283598f55679 /tests | |
| parent | 1380edcdf3e218f7d68f75e1d5c6ef00eaf913bc (diff) | |
{bash,zsh}: remove nix-shell early return in /etc/{bashrc,zshenv}
The condition does not match the comment, and therefore not the original
intention. It currently returns early in *any* type of Nix shell, not
just pure ones, including 'nix develop'.
Besides being unnecessary, this check prevents Nix shells from
functioning properly. For instance, it causes the initialization of the
Zsh fpath to be skipped, which is critical. The fact that the user is
unable to opt out of this behaviour makes this an ever bigger problem
since /etc/zshenv is being loaded unconditionally by Zsh.
For reference, NixOS does not perform such check, and apparently never
did.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/programs-zsh.nix | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/tests/programs-zsh.nix b/tests/programs-zsh.nix index dd5f6e9..9c98c33 100644 --- a/tests/programs-zsh.nix +++ b/tests/programs-zsh.nix @@ -22,8 +22,6 @@ echo >&2 "checking setEnvironment in /etc/zshenv" fgrep '. ${config.system.build.setEnvironment}' ${config.out}/etc/zshenv - echo >&2 "checking nix-shell return /etc/zshenv" - grep 'if test -n "$IN_NIX_SHELL"; then return; fi' ${config.out}/etc/zshenv echo >&2 "checking zshenv.d in /etc/zshenv" grep 'source /etc/zshenv.d/\*.conf' ${config.out}/etc/zshenv |
