fix: load_path find_app_root walk up to pipeline-app root

This commit is contained in:
p 2026-08-13 17:49:23 +08:00
parent addfdabc76
commit 9bc5e81574

View File

@ -112,10 +112,15 @@ PATHS_LOGINED = [
def find_app_root(): def find_app_root():
for c in [os.path.dirname(os.path.dirname(os.path.abspath(__file__))), # 从 scripts/ 向上逐层查找 set_role_perm.py(位于 pipeline-app 根目录)
os.path.expanduser("~/pipeline")]: d = os.path.dirname(os.path.abspath(__file__))
if os.path.isfile(os.path.join(c, "set_role_perm.py")): for _ in range(6):
return c if os.path.isfile(os.path.join(d, "set_role_perm.py")):
return d
parent = os.path.dirname(d)
if parent == d:
break
d = parent
return None return None