diff options
author | happysalada <raphael@megzari.com> | 2021-06-22 09:59:52 +0900 |
---|---|---|
committer | Raphael Megzari <raphael@megzari.com> | 2021-07-06 09:27:18 +0900 |
commit | 40ad05b4cbdc808c6fa5487ba195722c2734f02a (patch) | |
tree | 11d7d2c60a2ad51d1aa40264e0343cf76351f878 /pkgs/stdenv | |
parent | e39ee04d9796be7a6be35dda1894fc956ef203e8 (diff) | |
download | nixlib-40ad05b4cbdc808c6fa5487ba195722c2734f02a.tar nixlib-40ad05b4cbdc808c6fa5487ba195722c2734f02a.tar.gz nixlib-40ad05b4cbdc808c6fa5487ba195722c2734f02a.tar.bz2 nixlib-40ad05b4cbdc808c6fa5487ba195722c2734f02a.tar.lz nixlib-40ad05b4cbdc808c6fa5487ba195722c2734f02a.tar.xz nixlib-40ad05b4cbdc808c6fa5487ba195722c2734f02a.tar.zst nixlib-40ad05b4cbdc808c6fa5487ba195722c2734f02a.zip |
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.
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/generic/builder.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh index edac4ff89d73..986d94943c59 100644 --- a/pkgs/stdenv/generic/builder.sh +++ b/pkgs/stdenv/generic/builder.sh @@ -18,6 +18,6 @@ mkdir "$out" # Allow the user to install stdenv using nix-env and get the packages # in stdenv. mkdir $out/nix-support -if [ "$propagatedUserEnvPkgs" ]; then +if [ -n "${propagatedUserEnvPkgs:-}" ]; then printf '%s ' $propagatedUserEnvPkgs > $out/nix-support/propagated-user-env-packages fi |