Przeglądaj źródła

Merge pull request #7733 from thalesmg/fix-node-dump-root

fix(node_dump): define `RUNNER_ROOT_DIR` before sourcing vars
Zaiming (Stone) Shi 3 lat temu
rodzic
commit
12d7975c36
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      bin/node_dump

+ 4 - 4
bin/node_dump

@@ -2,13 +2,13 @@
 set -eu
 set -eu
 
 
 # shellcheck disable=SC1090,SC1091
 # shellcheck disable=SC1090,SC1091
-ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)"
-echo "Running node dump in ${ROOT_DIR}"
+RUNNER_ROOT_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"/..; pwd -P)"
+echo "Running node dump in ${RUNNER_ROOT_DIR}"
 
 
 # shellcheck disable=SC1090,SC1091
 # shellcheck disable=SC1090,SC1091
-. "$ROOT_DIR"/releases/emqx_vars
+. "$RUNNER_ROOT_DIR"/releases/emqx_vars
 
 
-cd "${ROOT_DIR}"
+cd "${RUNNER_ROOT_DIR}"
 
 
 DUMP="$RUNNER_LOG_DIR/node_dump_$(date +"%Y%m%d_%H%M%S").tar.gz"
 DUMP="$RUNNER_LOG_DIR/node_dump_$(date +"%Y%m%d_%H%M%S").tar.gz"
 CONF_DUMP="$RUNNER_LOG_DIR/conf.dump"
 CONF_DUMP="$RUNNER_LOG_DIR/conf.dump"