Skip to content

Commit f5b6741

Browse files
Fixing reference failure to root CA var when unset
Signed-off-by: David Perza <[email protected]>
1 parent 07cb4a4 commit f5b6741

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rhtap/common.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,12 @@ prepare-registry-user-pass() {
4949
}
5050

5151
function addRootCert() {
52-
if [ ! -z "$CUSTOM_ROOT_CA" ]; then
52+
if [ -n "${CUSTOM_ROOT_CA:-}" ]; then
5353
echo "Using provided CA bundle"
5454
echo "$CUSTOM_ROOT_CA" > /etc/pki/ca-trust/source/anchors/ca-bundle.crt
5555
update-ca-trust
56+
else
57+
echo "Custom root CA variable is not set. Make sure CA trust is established"
5658
fi
5759
}
5860

0 commit comments

Comments
 (0)