don't override SHELL

this variable might be useful in direnv to expose different behavior
depending on calling shell.

fixes https://github.com/nix-community/nix-direnv/issues/45
This commit is contained in:
Jörg Thalheim 2020-10-15 01:46:26 +02:00
parent c28d4ef615
commit bb0fc5792f
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -14,6 +14,7 @@ _nix_import_env() {
local old_path=${PATH:-}
local old_term=${TERM:-__UNSET__}
local old_shell=${SHELL:-__UNSET__}
local old_tmpdir=${TMPDIR:-__UNSET__}
local old_ssl_cert_file=${SSL_CERT_FILE:-__UNSET__}
local old_nix_ssl_cert_file=${NIX_SSL_CERT_FILE:-__UNSET__}
@ -30,8 +31,9 @@ _nix_import_env() {
fi
export PATH=$PATH${old_path:+":"}$old_path
_nix_export_or_unset TEMPDIR "$old_tmpdir"
_nix_export_or_unset TERM "$old_term"
_nix_export_or_unset SHELL "$old_shell"
_nix_export_or_unset TEMPDIR "$old_tmpdir"
# misleading since we are in an impure shell now
export IN_NIX_SHELL=impure