Disable wildcards when checking for unsupported components

Otherwise $COMMAND_LINE_COMPONENTS would try to expand wildcard patterns
based on files in the current directory.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2021-08-03 13:43:36 +02:00 committed by Thomas Daubney
parent 76d40fa977
commit 8bfe15f291

View file

@ -439,7 +439,9 @@ pre_parse_command_line () {
if [ $all_except -eq 0 ]; then
unsupported=0
set -f
for component in $COMMAND_LINE_COMPONENTS; do
set +f
case $component in
*[*?\[]*) continue;;
esac
@ -450,6 +452,7 @@ pre_parse_command_line () {
unsupported=$((unsupported + 1));;
esac
done
set +f
if [ $unsupported -ne 0 ]; then
exit 2
fi