[macos] Fix Homebrew install related check
[macos] Fix Homebrew install related check

Cherry-picked from
https://github.com/alrra/dotfiles/commit/9f032ef65c16b5b85d48757dcc1ed754268a19e1

wingy3181/dotfiles,wingy3181/dotfiles,wingy3181/dotfiles