Commit d34f9f2
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: c7c6abdd52361af8253ce068002e3c23dee16f6b1 parent 0909c5a commit d34f9f2
1 file changed
+31
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
382 | 383 | | |
383 | 384 | | |
384 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
385 | 411 | | |
386 | 412 | | |
387 | 413 | | |
| |||
490 | 516 | | |
491 | 517 | | |
492 | 518 | | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
499 | 524 | | |
500 | 525 | | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | 526 | | |
505 | 527 | | |
506 | 528 | | |
| |||
0 commit comments