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

nicknezis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git


The following commit(s) were added to refs/heads/master by this push:
     new a3d28a3  Fix get_heron_tracker_dir (#3734)
a3d28a3 is described below

commit a3d28a3a2a598e51bd97f42c28fffe44a657f55a
Author: choi se <[email protected]>
AuthorDate: Sat Nov 13 12:52:13 2021 +0900

    Fix get_heron_tracker_dir (#3734)
---
 heron/tools/tracker/src/python/utils.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/heron/tools/tracker/src/python/utils.py 
b/heron/tools/tracker/src/python/utils.py
index 754ce93..1d3808d 100644
--- a/heron/tools/tracker/src/python/utils.py
+++ b/heron/tools/tracker/src/python/utils.py
@@ -140,6 +140,9 @@ def get_heron_tracker_dir() -> str:
   This will extract heron tracker directory from .pex file.
   :return: root location for heron-tools.
   """
+  pex_file = os.environ.get('PEX', None)
+  if pex_file is not None:
+    return 
normalized_class_path(str(Path(pex_file).resolve(strict=True).parent.parent))
   # assuming the tracker runs from $HERON_ROOT/bin/heron-tracker
   root = Path(sys.argv[0]).resolve(strict=True).parent.parent
   return normalized_class_path(str(root))

Reply via email to