From 9079b53987e3d8dd82b0fa40a010f32524b13aeb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 22 Jun 2020 16:54:10 -0700 Subject: [PATCH] ci/bare-metal: Skip setting of unset variables at startup. It's silly to be setting (and logging the setting of!) all the env vars we *didn't* set in a job. Reviewed-by: Tomeu Vizoso Part-of: --- .gitlab-ci/bare-metal/rootfs-setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh index ba4cdf45bba..ff86054c4e6 100644 --- a/.gitlab-ci/bare-metal/rootfs-setup.sh +++ b/.gitlab-ci/bare-metal/rootfs-setup.sh @@ -39,7 +39,9 @@ for var in \ VK_DRIVER \ ; do val=`echo ${!var} | sed 's|"||g'` - echo "export $var=\"${val}\"" >> $rootfs_dst/set-job-env-vars.sh + if [ -n "$val" ]; then + echo "export $var=\"${val}\"" >> $rootfs_dst/set-job-env-vars.sh + fi done echo "Variables passed through:" cat $rootfs_dst/set-job-env-vars.sh -- 2.30.2