From 478f68042beef8d94f7c4353a27e599e7d8bfdcd Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 23 Nov 2021 18:15:58 +0100 Subject: [PATCH] GitHub Actions: Fix failures when commit message had certain characters The variable was not quoted and in certain cases the CMake code checking for ccache clearing messages would error and the job would fail. See 28a20b75bab8908e43ebf553a2ae2ef52775861b Change-Id: I7703a547129b3294b6d8094035a272e5d35c5c60 Reviewed-by: Alessandro Portale --- .github/workflows/build_cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml index d037726a259..92ce88f52cc 100644 --- a/.github/workflows/build_cmake.yml +++ b/.github/workflows/build_cmake.yml @@ -432,7 +432,7 @@ jobs: COMMAND git log --format=%B -n 1 ${{ github.event.after }} OUTPUT_VARIABLE git_commit_msg ) - if (${git_commit_msg} MATCHES "ccache:[ ]*clea[r|n]") + if ("${git_commit_msg}" MATCHES "ccache:[ ]*clea[r|n]") execute_process(COMMAND ccache --clear COMMAND_ECHO STDOUT) endif()