Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detect when installed casks self-update and change the version appropriately #1817

Closed
lanterndev opened this issue Nov 21, 2013 · 1 comment

Comments

@lanterndev
Copy link

I installed the mailplane cask some time ago and it ended up in /opt/homebrew-cask/Caskroom/mailplane/3.0_755. Since then Mailplane's built-in auto-update kicked in, so that now the version in the 3.0_755 directory is actually 3.1.0, but cask still thinks it's version 3.0_755.

There are plenty of other casks for self-updating software that can have this problem too (e.g. adium, vlc, tunnelblick, many others). Note that self-updating casks that install to a version such as "latest" or "stable" don't have this problem (e.g. firefox, google-chrome, spotify), but from #1798 I understand it's only possible to do this for software that provides a url to download the latest version.

Would be great if we could detect when a cask installed to <old_version> has self-updated, and update the cask installation to reflect that it's actually <new_version> to prevent confusion and leaving the cask in an inconsistent state.

In the meantime we should just document this behavior and tell users to not use installed casks' built-in self-updating when prompted if they want to avoid this.

@vitorgalvao
Copy link
Member

I understand it's only possible to do this for software that provides a url to download the latest version.

Well, not exactly. What @nanoxd was referring to was the way we handle it. We could just switch its version to “latest”, and it would work as you ask, there’s no technical impediment to that. However, that would be somewhat confusing when looking at the cask after the app has been upgraded — you’d see a url that points to an old version, being referred to as the latest version, which would be inaccurate.

Homebrew-cask also only works when you call it, so changing the directory’s name (as per your idea) would only happen after you run it again, not when the app is updated. A new command would probably have to be implemented for that.

I agree there should be a better way to handle this, but also do not think this solution would be the best. I do, however, think it’s a low priority feature (it doesn’t really prevent its usage in any regard, and there are more important features and fixes to handle right now). Ideas and pull requests are always welcome, though.

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants