buo / homebrew-cask-upgrade

A command line tool for upgrading every outdated app installed by Homebrew Cask
MIT License
2.44k stars 90 forks source link

Question: What is the -f flag for? #68

Closed 7k50 closed 7 years ago

7k50 commented 7 years ago

What is the usual purpose of using the -f flag? When I have it, it continually reinstalls applications that are already at their latest versions.

Readme:

-f --force Include apps that are marked as latest (i.e. force-reinstall them)

It doesn't appear to me that the flag is similar to brew cask reinstall x since that would reinstall all applications. It just acts on the applications denominated as "latest". What does that indeed mean in cask-speak?

buo commented 7 years ago

The -f flag is similar to brew cask reinstall something when you upgrade a specific app with brew cu -f something. Only the difference between them is that brew cask reinstall gracefully uninstall the app using previous cask file and reinstall it with new cask file, but brew cu just force installs the latest app and then delete old versions.

7k50 commented 7 years ago

@buo May I ask why one would want to reinstall apps that are "latest" – I am guessing that the answer is that cask doesn't provide versioning for these applications and just pushes out the last known release? So -f will simply reinstall the application whenever run.

buo commented 7 years ago

@winterflags yes, you are right. When an app is marked as "latest", its current version will always be "latest" no matter which version is installed on your machine. So you always need to reinstall the app to ensure that it's the latest.