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
This commit is contained in:
Artturin 2023-07-28 04:20:26 +03:00
parent 1fb560746e
commit 9816ca55c2

View File

@ -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