sous-chefs / homebrew

Development repository for the homebrew cookbook
https://supermarket.chef.io/cookbooks/homebrew
Apache License 2.0
152 stars 136 forks source link

Support arm64 install of Homebrew #153

Closed Brantone closed 2 years ago

Brantone commented 3 years ago

:speaking_head: Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

:ghost: Brief Description

Despite installing Homebrew (via their recommended Bash command), the cookbook is attempting to re-install (and in some cases can throw an error).

:pancakes: Cookbook version

5.2.2

:woman_cook: Chef-Infra Version

13 -> 17

:tophat: Platform details

macOS 11.0.1 - arm64

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Homebrew
  2. Run sudo chef-client
  3. Error: Need sudo access on macOS

:police_car: Expected behavior

Not attempt to re-install Homebrew

:heavy_plus_sign: Additional context

The check here https://github.com/sous-chefs/homebrew/blob/main/libraries/helpers.rb#L32 looks for /usr/local/bin/brew. But for arm64, installs into /opt/homebrew : https://github.com/Homebrew/install/blob/master/install.sh#L35

Possible solution: