Homebrew Formulae, how to prevent package updates from breaking macros?

As far as I am aware Brew Packages have to be triggered by full path in KM.

How can I prevent updates to Brew packages from breaking the connection with KM?

For example: Displayplacer uses the following path: /opt/homebrew/Cellar/displayplacer/1.2.0/bin/displayplacer

As you can see the folder contains it's version as well. Which means that which every update the connection with macros will be broken.

On Intel Macs there are links (without version numbers) in /usr/local/bin.

Don't you have something similar in /opt/homebrew/bin on your M1 Mac?

1 Like

Yes, we do. There is no need to go into the Cellar.

1 Like

As @rob and @drdrang pointed out, there are symlinks you can use that do not contain any version specific info.

You can set an ENV_PATH using the method @drdrang helped me with here a couple months ago. that way you don’t even have to specify the path in the shell scripts.

My Brew apps are not included in /usr/local/bin as symlinks

Is that normal behaviour? Should I generate them myself?

Once I set the ENV_PATH variable in KM how do I use it to call Brew Packages locations?

You don’t need to know exact locations; only names of binaries

The brew install command is supposed to create the symlinks for you. On an M1 Mac, the symlinks are in /opt/homebrew/bin/; on an Intel Mac, they're in /usr/local/bin/.

To test this, open Terminal and execute

which displayplacer

If it doesn't tell you that it's in one of those two directories, then something is wrong with your Homebrew setup, and I'm not sure what to tell you.

1 Like

Turns out my Brew installation is installed in the wrong place.

I suspect this happened while migrating from Intel to Apple Silicon. Big headache!

It sounds like I will have to uninstall brew and install it back in the right location. All my KM macros will disconnect in the meantime.

Gasp!

Yikes! All hopefully the process goes smoothly and you can get things back up and running quickly!

1 Like