From b89e939cc1f8c2c014c4c93c2f8f8b7cb117dc45 Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 14 May 2023 12:11:11 +0200 Subject: [PATCH] Force clean exit if grep finds no plugins --- templates/update-opensearch-plugins.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/update-opensearch-plugins.j2 b/templates/update-opensearch-plugins.j2 index 57df247..b39f16d 100644 --- a/templates/update-opensearch-plugins.j2 +++ b/templates/update-opensearch-plugins.j2 @@ -10,7 +10,7 @@ ACTION="${1:-help}" case "$ACTION" in purge) - PLUGINS=$($OPENSEARCH_BIN_PATH/opensearch-plugin list | grep -v opensearch-) + PLUGINS=$($OPENSEARCH_BIN_PATH/opensearch-plugin list | grep -v opensearch- || true) if [[ -z "$PLUGINS" ]]; then exit 0 else