Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only unset HOME when running cmake as root (#3507)
Summary: This hack is required to work around pytorch/test-infra#5091, which runs some CI jobs as root, which buck2 doesn't like. But we saw in #3502 that this can break things for some normal users. Reduce the blast radius of this hack, only modifying HOME when actually running as root. Mitigates #3502 Pull Request resolved: #3507 Test Plan: `./install_requirements.sh` succeeded locally. The build-wheels jobs for this PR do not break during the buck2 phase, and show that they're unsetting HOME. https://github.com/pytorch/executorch/actions/runs/8946028682/job/24575999986?pr=3507#step:14:118 ``` 2024-05-03T23:32:08.9616508Z temporarily unsetting HOME while running as root ``` https://github.com/pytorch/executorch/actions/runs/8946028682/job/24575999986?pr=3507#step:14:465 ``` 2024-05-03T23:32:08.9914557Z restored HOME ``` Reviewed By: larryliu0820 Differential Revision: D56958571 Pulled By: dbort fbshipit-source-id: c7c6abdd52361af8253ce068002e3c23dee16f6b
- Loading branch information