Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that the PEX_ROOT is always a realpath. (#2626)
In almost all codepaths, a `pex_root` will be a realpath. See, e.g., https://github.com/pex-tool/pex/blob/06b8850f35ae67377ad2fe31d62ee1f71ba61eea/pex/pex_info.py#L511 https://github.com/pex-tool/pex/blob/06b8850f35ae67377ad2fe31d62ee1f71ba61eea/pex/variables.py#L320 However there was one codepath by which a non-realpath could be obtained, namely `boot()` calling`Variables.PEX_ROOT.value_or()` with a `raw_pex_root` given as the fallback value. This change ensures that `Variables.PEX_ROOT` is always a realpath. This manifested as a bug at pex boot time in the presence of a symlinked cache dir: pantsbuild/pants#21321
- Loading branch information