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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user