Skip to content

Commit 07d8ad7

Browse files
authored
CMake: Quote parameter expansion for finding extra opts (#3666)
Not quoting can cause the expansion to be matched as a pattern rather than a literal. Reported by ShellCheck SC2295.
1 parent e0bddf8 commit 07d8ad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buildcmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function parse_triplet() {
7878
all_triplets=$(cd "$my_srcdir"/src/arch && find . -maxdepth 1 -name '*-*' -type d | sed 's,./,,')
7979
extra_triplet_opts="$full_triplet"
8080
for t in $all_triplets; do
81-
extra_triplet_opts=${extra_triplet_opts#$t}
81+
extra_triplet_opts=${extra_triplet_opts#"$t"}
8282
[[ $full_triplet == $t* ]] && actual_triplet=$t
8383
done
8484
if [[ -z ${actual_triplet:-} ]]; then

0 commit comments

Comments
 (0)