MacOS containers must upgrade Homebrew package location every build!

It appears that Homebrew made a major update, changed how casks work and where they are stored. As a result of this every time a build runs on a MacOS container that uses brew, it spends 7-10 minutes moving the cask files, before continuing on to do anything else. This has about doubled our build times. We have tried to use the save state feature, however it does not seem to be applying for any path outside of the working folder.

Is there any way we could get the MacOS base container updated with the latest Homebrew, so that this migration of packages is done once and no longer needs to be done on each run?

Could you downgrade your version of Homebrew in every build?

Not that I know of. I need to install new packages with brew. I am not trying to update brew itself explicitly, simply the act of installing a package at all forces the upgrade process, and brew moves its casks to the new location.

Ah, revealed with some Duckduckgoing, it seems there is an env var to disable Brew auto-updating.

1 Like

Thanks! That is helpful.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.