diff options
author | Artturin <Artturin@artturin.com> | 2023-07-28 04:20:26 +0300 |
---|---|---|
committer | Artturin <Artturin@artturin.com> | 2023-07-28 04:20:26 +0300 |
commit | 9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8 (patch) | |
tree | 069fc3a6b9ef58d8e2179328adcef9e5c180c323 /pkgs/stdenv/generic | |
parent | 1fb560746e1f06f4f32b0ff76da3309f9284e618 (diff) | |
download | nixpkgs-9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8.tar nixpkgs-9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8.tar.gz nixpkgs-9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8.tar.bz2 nixpkgs-9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8.tar.lz nixpkgs-9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8.tar.xz nixpkgs-9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8.tar.zst nixpkgs-9816ca55c2fd0619542f420f8e6cfaa8ebaf4ea8.zip |
stdenv: Make condition clearer
-z checks for a empty string -n checks for a not empty string It makes more sense to run the chmod if the string is not empty
Diffstat (limited to 'pkgs/stdenv/generic')
-rw-r--r-- | pkgs/stdenv/generic/setup.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 1f596ada5a0..7fe5f67b14d 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -1594,7 +1594,7 @@ genericBuild() { if [ "$curPhase" = unpackPhase ]; then # make sure we can cd into the directory - [ -z "${sourceRoot}" ] || chmod +x "${sourceRoot}" + [ -n "${sourceRoot:-}" ] && chmod +x "${sourceRoot}" cd "${sourceRoot:-.}" fi |