Skip to content

Commit

Permalink
optfeature.eclass: [QA] Fix unwanted globbing
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/498988
Reported-by: Mike Frysinger <[email protected]>
Suggested-by: Ulrich Müller <[email protected]>
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Jan 11, 2021
1 parent 7680f7e commit 1c584e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eclass/optfeature.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ optfeature() {
debug-print-function ${FUNCNAME} "$@"

local i j msg
local -a arr
local desc=$1
local flag=0
shift
for i; do
for j in ${i}; do
read -r -d '' -a arr <<<"${i}"
for j in "${arr[@]}"; do
if has_version "${j}"; then
flag=1
else
Expand All @@ -50,8 +52,9 @@ optfeature() {
done
if [[ ${flag} -eq 0 ]]; then
for i; do
read -r -d '' -a arr <<<"${i}"
msg=" "
for j in ${i}; do
for j in "${arr[@]}"; do
msg+=" ${j} and"
done
msg="${msg:0: -4} for ${desc}"
Expand Down

0 comments on commit 1c584e3

Please sign in to comment.