mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
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:
parent
c28d4ef615
commit
bb0fc5792f
1 changed files with 3 additions and 1 deletions
4
direnvrc
4
direnvrc
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue