From 3b8e88f50abc3f22190df603edfa71da262fea4f Mon Sep 17 00:00:00 2001 From: "Matteo Franci a.k.a. Fugerit" Date: Mon, 23 Sep 2024 08:25:07 +0200 Subject: [PATCH 1/2] If xmlstarlet fails, the script will fail https://github.com/amusarra/quarkus-mtls-auth/issues/1 --- src/main/shell/certs-manager/download_tsl_it_certs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/shell/certs-manager/download_tsl_it_certs.sh b/src/main/shell/certs-manager/download_tsl_it_certs.sh index adae235..442071f 100755 --- a/src/main/shell/certs-manager/download_tsl_it_certs.sh +++ b/src/main/shell/certs-manager/download_tsl_it_certs.sh @@ -174,7 +174,7 @@ parse_and_save_certs() { # Check if the XPath found any nodes if [ -z "${certs}" ]; then print_msg "${RED}" "❌ XPath set is empty. Please check the XML structure and XPath expression." - return + exit 1 fi if [ $VERBOSE -eq 1 ]; then From 1b57f093a375ec05fba0cfd181892e9a23e244b9 Mon Sep 17 00:00:00 2001 From: "Matteo Franci a.k.a. Fugerit" Date: Mon, 23 Sep 2024 09:00:03 +0200 Subject: [PATCH 2/2] Help on minimum xmlstarlet version minimum required version 1.6.1, compiled agains libxml2 2.9.14 and libxslt 1.1.35 https://github.com/amusarra/quarkus-mtls-auth/issues/1 --- src/main/shell/certs-manager/download_tsl_it_certs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/shell/certs-manager/download_tsl_it_certs.sh b/src/main/shell/certs-manager/download_tsl_it_certs.sh index 442071f..91060a5 100755 --- a/src/main/shell/certs-manager/download_tsl_it_certs.sh +++ b/src/main/shell/certs-manager/download_tsl_it_certs.sh @@ -173,7 +173,7 @@ parse_and_save_certs() { # Check if the XPath found any nodes if [ -z "${certs}" ]; then - print_msg "${RED}" "❌ XPath set is empty. Please check the XML structure and XPath expression." + print_msg "${RED}" "❌ XPath set is empty. Please check the XML structure and XPath expression. (check your xmlstarlet version, minimum required version 1.6.1, compiled against libxml2 2.9.14 and libxslt 1.1.35)." exit 1 fi