Open dansanduleac opened 4 years ago
There were some cases where we'd still try to set _ unsuccessfully, e.g. when sourcing the per-user nix.sh file when running a Nix installation. See https://github.com/oh-my-fish/plugin-foreign-env/pull/19#issuecomment-591451790
_
With some debugging messages printed out as to what it was returning from fenv.parse.diff:
fenv.parse.diff
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 “_”
Always filter out _ from being set in fish.
Actually fixes what https://github.com/oh-my-fish/plugin-foreign-env/pull/19 tried to achieve.
Before this PR
There were some cases where we'd still try to set
_
unsuccessfully, e.g. when sourcing the per-user nix.sh file when running a Nix installation. See https://github.com/oh-my-fish/plugin-foreign-env/pull/19#issuecomment-591451790With some debugging messages printed out as to what it was returning from
fenv.parse.diff
:After this PR
Always filter out
_
from being set in fish.Actually fixes what https://github.com/oh-my-fish/plugin-foreign-env/pull/19 tried to achieve.