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

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


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

commit 70ba5fc4508f47529e7afd68e886f22959b515a4
Author: Caideyipi <[email protected]>
AuthorDate: Wed May 6 17:27:01 2026 +0800

    Fixed the print-tsfile.sh to avoid wrong IOTDB_HOME (#17596)
---
 scripts/tools/tsfile/print-tsfile.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/tools/tsfile/print-tsfile.sh 
b/scripts/tools/tsfile/print-tsfile.sh
index da1ba8d0688..3c32f8cb53d 100644
--- a/scripts/tools/tsfile/print-tsfile.sh
+++ b/scripts/tools/tsfile/print-tsfile.sh
@@ -24,9 +24,11 @@ echo ---------------------
 
 source "$(dirname "$0")/../../conf/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"
 
 
@@ -51,4 +53,4 @@ done
 MAIN_CLASS=org.apache.iotdb.db.tools.TsFileSketchTool
 
 "$JAVA" $JVM_OPTS -cp "$CLASSPATH" "$MAIN_CLASS" "$@"
-exit $?
\ No newline at end of file
+exit $?

Reply via email to