I am trying to install some softwares using brew cask and I would like to check if the package/formula is already installed through brew or other means
I have a script that installs a list of softwares using brew cask and I dont want it to install a software that is already present on the machine
To achive this I referred to this question: With Homebrew, how to check if a software/package is installed?
This is pointed me in the right direction but I can only avoid installing software that is installed via brew cask.
If the software is installed by downloading the dmg and is already present in the /Applications/ folder then it does not recognize that and it continues to install the software.
Is there a way to figure out if the application is installed via brew or any other means before my script starts installing it
find
command to search the/Applications
and~/Applications
folder for the target formula. List out all the matches in the console and ask user if they want to continue install or not.brew cask info --json=v1 google-chrome
orbrew cask info google-chrome
to find the name the cask will install to. It won't help in case of renamed applications though.