Skip to content

Commit 6655b88

Browse files
committed
Fix Homebrew container install user
1 parent 2ff10b0 commit 6655b88

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/pr-check.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,11 @@ jobs:
414414
- name: Homebrew Python
415415
if: startsWith( matrix.image, 'homebrew')
416416
run: |
417-
# homebrew/brew:4.4.6 broke running `brew install` as root.
418-
# As a workaround, running `brew update` and ignoring errors coming from it fixes `brew install`.
419-
brew update || true
420-
brew install python@3.12 python@3.11
417+
# The job container runs as root so Actions checkout/tooling can write to the
418+
# mounted workspace, but Homebrew's prefix is owned by linuxbrew and recent
419+
# homebrew/brew images have been brittle when `brew install` runs as root.
420+
su - linuxbrew -c 'brew update || true'
421+
su - linuxbrew -c 'brew install python@3.12 python@3.11'
421422
shell: bash
422423

423424
# Rust

0 commit comments

Comments
 (0)