aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 05:59:32 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 05:59:32 +0100
commit9981c714f632fe755f9ebc5aff3b1b7bf6c142d2 (patch)
tree76e94469cf487f6bb041a8092ddb1e9454468345 /scripts
parent340a6cf97796ffde4afe7bd7af5619e1cf821c7b (diff)
Merge pull request #9425 from iFreilicht/fix-unbound-variable-errors
Fix "unbound variable" errors in bash (cherry picked from commit 9ad9e988b83a9a9a9748034ac77e743b2cab20e6) Change-Id: Ib7c8cb303f34104b9785c9376225f93174f3dae7
Diffstat (limited to 'scripts')
-rw-r--r--scripts/nix-profile-daemon.sh.in2
-rw-r--r--scripts/nix-profile.sh.in2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-profile-daemon.sh.in b/scripts/nix-profile-daemon.sh.in
index c63db4648..d256b24ed 100644
--- a/scripts/nix-profile-daemon.sh.in
+++ b/scripts/nix-profile-daemon.sh.in
@@ -31,7 +31,7 @@ fi
export NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_LINK"
# 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
export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
else
diff --git a/scripts/nix-profile.sh.in b/scripts/nix-profile.sh.in
index 56e070ae1..44bc96e89 100644
--- a/scripts/nix-profile.sh.in
+++ b/scripts/nix-profile.sh.in
@@ -33,7 +33,7 @@ if [ -n "$HOME" ] && [ -n "$USER" ]; then
export NIX_PROFILES="@localstatedir@/nix/profiles/default $NIX_LINK"
# 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
export XDG_DATA_DIRS="/usr/local/share:/usr/share:$NIX_LINK/share:/nix/var/nix/profiles/default/share"
else