Skip to content

Commit

Permalink
Ensure SBOM makejdk-any-platform quotes args when necessary (#3835)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Leonard <anleonar@redhat.com>
  • Loading branch information
andrew-m-leonard authored Jun 3, 2024
1 parent 8372726 commit 2ad2f7c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion makejdk-any-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ configure_build "$@"
writeConfigToFile

# Store params to this script as "buildinfo"
echo "$@" > ./workspace/config/makejdk-any-platform.args
# Ensure arguments containing "spaces" are quoted
makeJdkArgs=""
for arg in "$@"; do
# Quote the argument if it contains spaces
if [[ "${arg}" =~ .*" ".* ]]; then
makeJdkArgs="${makeJdkArgs} \"${arg}\""
else
makeJdkArgs="${makeJdkArgs} ${arg}"
fi
done
echo "${makeJdkArgs}" > ./workspace/config/makejdk-any-platform.args

# Let's build and test the (Adoptium) OpenJDK binary in Docker or natively
if [ "${BUILD_CONFIG[USE_DOCKER]}" == "true" ] ; then
Expand Down

0 comments on commit 2ad2f7c

Please sign in to comment.