Closed edlanglois closed 5 years ago
Correction: The SHLVL warning I encountered seems to have been triggered by the update to bash 5.0 rather than the update to fish 3.0. I don't have a fully understanding of the issues but possibly the latest version of bash increments SHLVL for certain subshells when past versions did not.
I don't know if that makes this a bash issue or not, but either way this change solves the problem.
Example invocation before the change in this commit:
> fenv true
set: Tried to change the read-only variable “SHLVL”
Done
LGTM
Dear @oh-my-fish/core, squash and merge at your earliest convenience 😉
I still get the same error running fish installed from nix, specifically when sourcing the nix per-user profile at ~/.nix-profile/etc/profile.d/nix.sh
with fenv
.
I've added some debug logging in fenv.parse.diff.fish
to showcase what changes:
Setting: NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
Setting: PATH=/Users/dansanduleac/.nix-profile/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Setting: _=/Users/dansanduleac/.nix-profile/bin/env
set: Tried to change the read-only variable “_”
Originally, the 2nd
env
call was made within one additional bash subshell causing the SHLVL variable to differ and therefore be assigned by fenv.In fish 3.0 this resulted in a warning message because SHLVL is read only.