This is an automated email from the ASF dual-hosted git repository.

DomGarguilo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git


The following commit(s) were added to refs/heads/main by this push:
     new 9011f8b760 Properly exit subshell on error in accumulo-cluster script 
(#6536)
9011f8b760 is described below

commit 9011f8b760709dbd8b07653a7b9557388e55e671
Author: Dom G. <[email protected]>
AuthorDate: Thu Sep 17 15:09:55 2026 -0400

    Properly exit subshell on error in accumulo-cluster script (#6536)
    
    * Properly exit subshell on error in accumulo-cluster script
    
    * existing typo fix
---
 assemble/bin/accumulo-cluster | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/assemble/bin/accumulo-cluster b/assemble/bin/accumulo-cluster
index 7e8bd9a00c..e19bc83ddc 100755
--- a/assemble/bin/accumulo-cluster
+++ b/assemble/bin/accumulo-cluster
@@ -297,7 +297,10 @@ function parse_config() {
     exit 1
   fi
 
-  AC_TMP_DIR=$(mktemp -t -d "accumulo-cluster-XXXXXXXX") || (echo "Error 
creating temp file" && exit 1)
+  AC_TMP_DIR=$(mktemp -t -d "accumulo-cluster-XXXXXXXX") || {
+    echo "Error creating temp file" >&2
+    exit 1
+  }
   if isDebug; then
     echo "$(blue DEBUG): Temporary files for this run are in $AC_TMP_DIR"
   else
@@ -306,7 +309,10 @@ function parse_config() {
 
   RG_FILE="$AC_TMP_DIR/ZooInfoViewer.out"
   debug "Printing resource groups to $RG_FILE"
-  "$accumulo_cmd" zk info-viewer --print-resource-groups >"$RG_FILE" || (echo 
"Error getting resource groups. Did you init?" && exit 1)
+  "$accumulo_cmd" zk info-viewer --print-resource-groups >"$RG_FILE" || {
+    echo "Error getting resource groups. Did you init?" >&2
+    exit 1
+  }
   read -r -a all_resource_groups <<<"$(grep -F 'Resource Groups: ' "$RG_FILE" 
| cut -c18-)"
   debug "All resource groups: ${all_resource_groups[*]}"
 
@@ -718,7 +724,10 @@ function prune() {
     exit 1
   fi
   local service_json="$AC_TMP_DIR/accumulo-service.json"
-  "$accumulo_cmd" inst service-status --json >"$service_json" 2>/dev/null || 
(echo "Error calling 'inst serviceStatus'" && exit 1)
+  "$accumulo_cmd" inst service-status --json >"$service_json" 2>/dev/null || {
+    echo "Error calling 'inst service-status'" >&2
+    exit 1
+  }
 
   local var_name
   local hosts

Reply via email to