From 90325d305e9a4d75e685a9605cec5c785d87be5e Mon Sep 17 00:00:00 2001 From: bluepython508 <16466646+bluepython508@users.noreply.github.com> Date: Tue, 24 Sep 2024 22:25:30 +0100 Subject: [PATCH] Don't crash on unbound variables --- default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 0e39100..6c4de0b 100644 --- a/default.nix +++ b/default.nix @@ -38,7 +38,7 @@ file="$FRAJTANO_DIR/cookie" (umask 077; [ -f "$file" ] || ${pkgs.coreutils}/bin/head -c 128 /dev/urandom | ${pkgs.coreutils}/bin/base64 -w0 > "$file") export RELEASE_COOKIE=$(${pkgs.coreutils}/bin/cat "$file") - [ -n $RELEASE_NODE ] || export RELEASE_NODE="frajtano-$(${pkgs.coreutils}/bin/whoami)@$(${pkgs.coreutils}/bin/cat /etc/hostname)" + [ -n ''${RELEASE_NODE:-} ] || export RELEASE_NODE="frajtano-$(${pkgs.coreutils}/bin/whoami)@$(${pkgs.coreutils}/bin/cat /etc/hostname)" run() { exec ${lib.getExe pkg} "$@" }