gitlab-ci: fix testing whether a variable with a given name is set or not
The previous code considered unset variables the same as set-but-empty; sometimes setting a variable as something empty is meaningful, so let's pass them through properly. Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6389>
This commit is contained in:

committed by
Marge Bot

parent
64fb3e6def
commit
72fac11ca3
@@ -50,7 +50,7 @@ for var in \
|
||||
VK_DRIVER \
|
||||
; do
|
||||
val=`echo ${!var} | sed 's|"||g'`
|
||||
if [ -n "$val" ]; then
|
||||
if [ -n "${!var+x}" ]; then
|
||||
echo "export $var=\"${val}\"" >> $rootfs_dst/set-job-env-vars.sh
|
||||
fi
|
||||
done
|
||||
|
Reference in New Issue
Block a user