You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2023/01/16 01:15:32 UTC

[GitHub] [shardingsphere] TeslaCN commented on a diff in pull request #23572: Refactor : set agent start with proxy if the switch set to -g (#23541)

TeslaCN commented on code in PR #23572:
URL: https://github.com/apache/shardingsphere/pull/23572#discussion_r1070736128


##########
distribution/proxy/src/main/resources/bin/start.sh:
##########
@@ -134,6 +135,20 @@ if [ "$1" == "-v" ] || [ "$1" == "--version" ] ; then
     print_version
 fi
 
+
+function enable_agent() {
+    AGENT_PARAM="";
+    AGENT_FILE="${DEPLOY_DIR}/agent/shardingsphere-agent.jar"
+    if [ -f "$AGENT_FILE" ]; then
+      AGENT_PARAM=" -javaagent:${AGENT_FILE} "
+    fi
+}
+
+if [ "$1" == "-g" ] || [ "$1" == "--agent" ] ; then

Review Comment:
   Is it possible that the `-g` is not in `$1`?



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org