You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ju...@apache.org on 2026/05/08 09:48:04 UTC
(iotdb) 01/01: Fixed the print-tsfile.sh to avoid wrong IOTDB_HOME (#17596)
This is an automated email from the ASF dual-hosted git repository.
Caideyipi pushed a commit to branch foot-stem
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 182a752977a947e60887ff917e3c0e85c574ad53
Author: Caideyipi <87...@users.noreply.github.com>
AuthorDate: Wed May 6 17:27:01 2026 +0800
Fixed the print-tsfile.sh to avoid wrong IOTDB_HOME (#17596)
---
.../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 $?