Skip to content

Commit f0b8baf

Browse files
committed
ci: build: Fix quoting of extracted commands
The build command is extracted from compile_commands.json via jq -r and executed via $compile_cmd. The command contains shell quoting like -DKBUILD_MODNAME='\"adrv906x_eth\"' where single quotes protect double quotes. Replace $compile_cmd with eval "$compile_cmd" so bash properly processes the quoting before executing Replace printf "$compile_cmd ..." with plain string assignment compile_cmd="$compile_cmd ..." (avoids interpreting % format specifiers) Signed-off-by: Jorge Marques <jorge.marques@analog.com>
1 parent 4d99c91 commit f0b8baf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ci/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -893,9 +893,9 @@ compile_gcc_fanalyzer () {
893893
fi
894894

895895
echo -e "\e[1m$file\e[0m"
896-
compile_cmd=$(printf "$compile_cmd -fanalyzer")
896+
compile_cmd="$compile_cmd -fanalyzer"
897897
pushd $compile_dir
898-
mail=$($compile_cmd 2>&1 || (
898+
mail=$(eval "$compile_cmd" 2>&1 || (
899899
echo "::error file=$file,line=0::$step_name: Exited with code '$?'" ; true)
900900
)
901901
popd
@@ -977,9 +977,9 @@ compile_clang_analyzer () {
977977
fi
978978

979979
echo -e "\e[1m$file\e[0m"
980-
compile_cmd=$(printf "$compile_cmd --analyze -Xanalyzer -analyzer-output=text")
980+
compile_cmd="$compile_cmd --analyze -Xanalyzer -analyzer-output=text"
981981
pushd $compile_dir
982-
mail=$($compile_cmd 2>&1 || (
982+
mail=$(eval "$compile_cmd" 2>&1 || (
983983
echo "::error file=$file,line=0::$step_name: Exited with code '$?'" ; true)
984984
)
985985
popd

0 commit comments

Comments
 (0)