Force clean exit if grep finds no plugins

This commit is contained in:
phil 2023-05-14 12:11:11 +02:00
parent 889924fee4
commit b89e939cc1

View file

@ -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