fix: bwrap 检测 /d/pipeline/bin/bwrap 路径

This commit is contained in:
ymq 2026-08-13 17:58:54 +08:00
parent 08ae248c2a
commit edaf1b4ad2

View File

@ -24,6 +24,8 @@ DEPLOY_ENV_BASE = "/d/pipeline/deploy_envs"
# bwrap 可执行文件(未安装时为 None降级为目录隔离
BWRAP = shutil.which("bwrap")
if not BWRAP and os.path.exists("/d/pipeline/bin/bwrap"):
BWRAP = "/d/pipeline/bin/bwrap"
# 账号名合法字符(目录安全,防路径穿越)
_SAFE_RE = re.compile(r"[^a-zA-Z0-9_-]")