mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 08:42:30 +00:00
Merge pull request #9426 from NixOS/backport-9425-to-2.19-maintenance
[Backport 2.19-maintenance] Fix "unbound variable" errors in bash
This commit is contained in:
commit
455aca36e4
@ -31,7 +31,7 @@ fi
|
|||||||
export NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_LINK"
|
export NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_LINK"
|
||||||
|
|
||||||
# Populate bash completions, .desktop files, etc
|
# Populate bash completions, .desktop files, etc
|
||||||
if [ -z "$XDG_DATA_DIRS" ]; then
|
if [ -z "${XDG_DATA_DIRS-}" ]; then
|
||||||
# According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
|
# According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
|
||||||
export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
|
export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
|
||||||
else
|
else
|
||||||
|
@ -33,7 +33,7 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
|
|||||||
export NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_LINK"
|
export NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_LINK"
|
||||||
|
|
||||||
# Populate bash completions, .desktop files, etc
|
# Populate bash completions, .desktop files, etc
|
||||||
if [ -z "$XDG_DATA_DIRS" ]; then
|
if [ -z "${XDG_DATA_DIRS-}" ]; then
|
||||||
# According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
|
# According to XDG spec the default is /usr/local/share:/usr/share, don't set something that prevents that default
|
||||||
export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
|
export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user