From 2e7da94ebda3b20300c20f79a9eef0a6027f5644 Mon Sep 17 00:00:00 2001 From: Benjy Weinberger Date: Fri, 13 Dec 2024 14:22:51 -0800 Subject: [PATCH] Ensure that the PEX_ROOT is always a realpath. --- pex/variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pex/variables.py b/pex/variables.py index e14b7351a..dd536abf4 100644 --- a/pex/variables.py +++ b/pex/variables.py @@ -660,7 +660,7 @@ def PEX_ROOT(self): @PEX_ROOT.validator def _ensure_writeable_pex_root(self, raw_pex_root): - pex_root = os.path.expanduser(raw_pex_root) + pex_root = os.path.realpath(os.path.expanduser(raw_pex_root)) if not can_write_dir(pex_root): tmp_root = os.path.realpath(safe_mkdtemp()) pex_warnings.warn(