mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
Preserve XDG_DATA_DIRS
This commit is contained in:
parent
04f80bf417
commit
7ac4290e82
1 changed files with 2 additions and 0 deletions
2
direnvrc
2
direnvrc
|
|
@ -23,6 +23,7 @@ _nix_import_env() {
|
|||
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__}
|
||||
local old_xdg_data_dirs=${XDG_DATA_DIRS:-}
|
||||
|
||||
eval "$env"
|
||||
|
||||
|
|
@ -39,6 +40,7 @@ _nix_import_env() {
|
|||
_nix_export_or_unset TERM "$old_term"
|
||||
_nix_export_or_unset SHELL "$old_shell"
|
||||
_nix_export_or_unset TEMPDIR "$old_tmpdir"
|
||||
export XDG_DATA_DIRS=$XDG_DATA_DIRS${old_xdg_data_dirs:+":"}$old_xdg_data_dirs
|
||||
|
||||
# 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