Skip to content

Commit 3b32d74

Browse files
committed
builder.sh: check if variable is non null
This is not the "correct" way to check if a variable is non null in bash. There is already an instance of the "right" way to do it in setup.sh. Bash is "generous" enough to accept the original input though. I couldn't find the relevant shellcheck.
1 parent 70caf23 commit 3b32d74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkgs/stdenv/generic/builder.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ mkdir "$out"
1818
# Allow the user to install stdenv using nix-env and get the packages
1919
# in stdenv.
2020
mkdir $out/nix-support
21-
if [ "$propagatedUserEnvPkgs" ]; then
21+
if [ -n "${propagatedUserEnvPkgs:-}" ]; then
2222
printf '%s ' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages
2323
fi

0 commit comments

Comments
 (0)