Skip to content

Commit d552f6f

Browse files
committed
Improve quoting for avoiding unexpected globbing
1 parent 8b0110c commit d552f6f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ exec 1>&2 # redirect all output to stderr for logging
88
payload=$(cat <&0)
99

1010
source_family=$(jq -r '.source.family // empty' <<< "${payload}")
11-
if [[ -z ${source_family} ]]; then
11+
if [[ -z "${source_family}" ]]; then
1212
echo >&2 "Source parameter 'family' is missing"
1313
exit 1
1414
fi
1515

1616
directory="${source_family}"
17-
if [[ ${source_family} == 0.9.* ]]; then
17+
if [[ "${source_family}" == 0.9.* ]]; then
1818
directory="0.9.x"
1919
fi
2020

in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ if [[ -z ${version} ]]; then
1616
fi
1717

1818
source_family=$(jq -r '.source.family // empty' <<< "${payload}")
19-
if [[ -z ${source_family} ]]; then
19+
if [[ -z "${source_family}" ]]; then
2020
echo >&2 "Source parameter 'family' is missing"
2121
exit 1
2222
fi
@@ -28,7 +28,7 @@ echo "${version}" > version
2828
echo "${source_family}" > family
2929

3030
directory="${source_family}"
31-
if [[ ${source_family} == 0.9.* ]]; then
31+
if [[ "${source_family}" == 0.9.* ]]; then
3232
directory="0.9.x"
3333
fi
3434

@@ -42,7 +42,7 @@ tarball_url=$(
4242
| sed -nEe 's|^.*href="(openssl-'"${version}"'\.tar\.gz)">.*|https://www.openssl.org/source/\1|p'
4343
) | tail --lines="1"
4444
)
45-
if [[ -z ${tarball_url} ]]; then
45+
if [[ -z "${tarball_url}" ]]; then
4646
echo >&2 "No such 'openssl-${version}.tar.gz' tarball available" \
4747
"on 'https://artfiles.org/openssl.org/source/'" \
4848
"or 'https://artfiles.org/openssl.org/source/old/${directory}/'"

0 commit comments

Comments
 (0)