From 3b25f39553872082a4d68080b283da95f37440d5 Mon Sep 17 00:00:00 2001 From: Simeon Ehrig Date: Thu, 14 Nov 2024 15:40:45 +0100 Subject: [PATCH] fix 2 --- script/gitlabci/print_env.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/script/gitlabci/print_env.sh b/script/gitlabci/print_env.sh index 7972fba148e..a358b9f7623 100755 --- a/script/gitlabci/print_env.sh +++ b/script/gitlabci/print_env.sh @@ -45,9 +45,11 @@ echo "${CI_RUNNER_TAGS}" # take all env variables, filter it and display it with a `export` prefix env_name_prefixes=("^ALPAKA_*" "^alpaka_*" "^CMAKE_*" "^BOOST_*" "^CUDA_*") for reg in ${env_name_prefixes[@]}; do - printenv | grep -E ${reg} | while read -r line ; do - echo "export $line \\" - done + if printenv | grep -qE ${reg}; then + printenv | grep -E ${reg} | while read -r line ; do + echo "export $line \\" + done + fi done echo "export CI_RUNNER_TAGS='${CI_RUNNER_TAGS}' \\"