Skip to content

Commit 70ba5fc

Browse files
authored
Fixed the print-tsfile.sh to avoid wrong IOTDB_HOME (#17596)
1 parent 26583b8 commit 70ba5fc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/tools/tsfile/print-tsfile.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ echo ---------------------
2424

2525
source "$(dirname "$0")/../../conf/iotdb-common.sh"
2626
#get_iotdb_include and checkAllVariables is in iotdb-common.sh
27+
if [ -z "${IOTDB_HOME}" ]; then
28+
export IOTDB_HOME="$(cd "`dirname "$0"`"/../..; pwd)"
29+
fi
2730
VARS=$(get_iotdb_include "$*")
2831
checkAllVariables
29-
export IOTDB_HOME="${IOTDB_HOME}/.."
3032
eval set -- "$VARS"
3133

3234

@@ -51,4 +53,4 @@ done
5153
MAIN_CLASS=org.apache.iotdb.db.tools.TsFileSketchTool
5254

5355
"$JAVA" $JVM_OPTS -cp "$CLASSPATH" "$MAIN_CLASS" "$@"
54-
exit $?
56+
exit $?

0 commit comments

Comments
 (0)