File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,10 +414,12 @@ 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+ brew_bin="$(command -v brew)"
421+ su linuxbrew -c "${brew_bin} update || true"
422+ su linuxbrew -c "${brew_bin} install python@3.12 python@3.11"
421423 shell : bash
422424
423425 # Rust
You can’t perform that action at this time.
0 commit comments