Allow Homebrew to install a package using Platypus

44 Views Asked by At

I'm trying to create a point-and-click "application" for Mac which installs packages via Homebrew. At the moment, I'm using a shell script which is wrapped in a Mac "app" powered by Platypus.

I can install homebrew using Platypus by executing the following in the script which powers the Platypus app:

eval "$($brew_path/brew shellenv)"

This allows me to check for which brew without issue which is useful for checking whether casks have been installed via brew.

When I try to use brew to install a package via the Platypus app, the package downloads, but brew errors out when it attempts to actually install the app because sudo privileges are required for that to finish.

I'm still exploring whether I can get the Platypus app to accept user input. (See: Platypus shell script does not prompt for "read" command) Assuming I can, is it possible to pass this input through to the brew command via bash?

Or, is this whole attempt a lost cause?

0

There are 0 best solutions below