ctubbsii commented on code in PR #5158:
URL: https://github.com/apache/accumulo/pull/5158#discussion_r1878892170


##########
assemble/bin/accumulo-cluster:
##########
@@ -177,16 +166,20 @@ function control_service() {
       # using the value of $host
       #
       if [[ $# -gt 3 ]]; then
-        debugAndRun ACCUMULO_SERVICE_INSTANCE="${ACCUMULO_SERVICE_INSTANCE}" 
"${bin}/accumulo-service" "$service" "$control_cmd" "-a" "$host" "${@:4}"
+        debug "ACCUMULO_SERVICE_INSTANCE=\"$ACCUMULO_SERVICE_INSTANCE\" 
\"$bin/accumulo-service\" \"$service\" \"$control_cmd\" -a \"$host\" 
\"${*:4}\"" ||
+          ACCUMULO_SERVICE_INSTANCE="$ACCUMULO_SERVICE_INSTANCE" 
"$bin/accumulo-service" "$service" "$control_cmd" -a "$host" "${@:4}"
       else
-        debugAndRun ACCUMULO_SERVICE_INSTANCE="${ACCUMULO_SERVICE_INSTANCE}" 
"${bin}/accumulo-service" "$service" "$control_cmd" "-a" "$host"
+        debug "ACCUMULO_SERVICE_INSTANCE=\"$ACCUMULO_SERVICE_INSTANCE\" 
\"$bin/accumulo-service\" \"$service\" \"$control_cmd\" -a \"$host\"" ||
+          ACCUMULO_SERVICE_INSTANCE="$ACCUMULO_SERVICE_INSTANCE" 
"$bin/accumulo-service" "$service" "$control_cmd" -a "$host"
       fi
     else
       if [[ $# -gt 3 ]]; then
         EXTRA_ARGS="${*:4}"
-        debugAndRun "$SSH" "$host" "bash -c 
'ACCUMULO_SERVICE_INSTANCE=${ACCUMULO_SERVICE_INSTANCE} ${bin}/accumulo-service 
\"$service\" \"$control_cmd\" \"-a\" \"$host\" $EXTRA_ARGS '"
+        debug "$SSH \"$host\" \"bash -c 
'ACCUMULO_SERVICE_INSTANCE=\\\"$ACCUMULO_SERVICE_INSTANCE\\\" 
\\\"$bin/accumulo-service\\\" \\\"$service\\\" \\\"$control_cmd\\\" -a 
\\\"$host\\\" $EXTRA_ARGS '\"" ||

Review Comment:
   Right, I added that back in because I thought it would be beneficial to be 
able to see a copy-and-paste safe version of the command. But, we certainly 
don't have to have that... we just need to be mindful of the debugging output 
that it may require additional quoting and won't be able to be copy-and-pasted 
directly.
   
   I can pull that part out, if you want. I just thought it was helpful, and 
wanted to demonstrate it here for consideration.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to