R/homebrew.R
raw| 1 | |
| 2 | renv_homebrew_root <- function() { |
| 3 | |
| 4 | # allow override |
| 5 | root <- Sys.getenv("RENV_HOMEBREW_ROOT", unset = NA) |
| 6 | if (!is.na(root)) |
| 7 | return(root) |
| 8 | |
| 9 | # indirection for arm64 macOS |
| 10 | if (renv_platform_macos() && renv_platform_machine() != "x86_64") |
| 11 | return("/opt/homebrew") |
| 12 | |
| 13 | # default to /usr/local |
| 14 | "/usr/local" |
| 15 | |
| 16 | } |