Change brew update logic to run much faster (#25988)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25988
Running `brew update` used to take over 6 minutes. Now it completes in
about 30 seconds.
Test Plan: Imported from OSS
Differential Revision: D17318585
Pulled By: pietern
fbshipit-source-id: 75956aebc887cb29dbc2bc7efbf823243f18ab01