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

jt2594838 pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev/1.3 by this push:
     new 35482e4b58c Fixed the print-tsfile.sh to avoid wrong IOTDB_HOME 
(#17596) (#17621)
35482e4b58c is described below

commit 35482e4b58ce6f2734e1f26859542144e3c2a845
Author: Caideyipi <[email protected]>
AuthorDate: Sat May 9 10:37:11 2026 +0800

    Fixed the print-tsfile.sh to avoid wrong IOTDB_HOME (#17596) (#17621)
---
 .../datanode/src/assembly/resources/tools/tsfile/print-tsfile.sh  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/iotdb-core/datanode/src/assembly/resources/tools/tsfile/print-tsfile.sh 
b/iotdb-core/datanode/src/assembly/resources/tools/tsfile/print-tsfile.sh
index 8864ca877e7..8e27793a7ff 100644
--- a/iotdb-core/datanode/src/assembly/resources/tools/tsfile/print-tsfile.sh
+++ b/iotdb-core/datanode/src/assembly/resources/tools/tsfile/print-tsfile.sh
@@ -24,9 +24,11 @@ echo ---------------------
 
 source "$(dirname "$0")/../../sbin/iotdb-common.sh"
 #get_iotdb_include and checkAllVariables is in iotdb-common.sh
+if [ -z "${IOTDB_HOME}" ]; then
+  export IOTDB_HOME="$(cd "`dirname "$0"`"/../..; pwd)"
+fi
 VARS=$(get_iotdb_include "$*")
 checkAllVariables
-export IOTDB_HOME="${IOTDB_HOME}/.."
 eval set -- "$VARS"
 
 
@@ -48,5 +50,5 @@ done
 
 MAIN_CLASS=org.apache.iotdb.db.tools.TsFileSketchTool
 
-"$JAVA" -cp "$CLASSPATH" "$MAIN_CLASS" "$@"
-exit $?
\ No newline at end of file
+"$JAVA" $JVM_OPTS -cp "$CLASSPATH" "$MAIN_CLASS" "$@"
+exit $?

Reply via email to