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

Upgrading fish formula from bottle fails due to fish cask #5709

Closed
5 tasks done
mistydemeo opened this issue Feb 11, 2019 · 0 comments
Closed
5 tasks done

Upgrading fish formula from bottle fails due to fish cask #5709

mistydemeo opened this issue Feb 11, 2019 · 0 comments
Labels
outdated PR was locked due to age

Comments

@mistydemeo
Copy link
Member

Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

When running brew upgrade, the fish formula was upgraded from 3.0.0 to 3.0.1.

What happened (include command output)

During the upgrade, this confusing error was raised. This left fish in a half-broken state, where it was installed but not linked.

Command output
==> Upgrading fish
==> Downloading https://homebrew.bintray.com/bottles/fish-3.0.1.mojave.bottle.tar.gz
######################################################################## 100.0%
==> Pouring fish-3.0.1.mojave.bottle.tar.gz
Error: Cask 'fish' definition is invalid: invalid 'depends_on macos' value: ":snow_leopard"
  

What you expected to happen

Installation succeeds.

Step-by-step reproduction instructions (by running brew commands)

  1. brew install fish

This is caused by 6f184ea, which rescues Cask::CaskUnavailableError but not Cask::CaskInvalidError. In this case the fish cask is invalid and can neither be installed nor loaded; this meant that brew install fish also fails, since it now depends on the cask being valid.

The second issue this exposes is that we should be able to handle this kind of exception in formula_installer a bit more graciously; it shouldn't leave a package installed but unlinked.

mistydemeo added a commit that referenced this issue Feb 11, 2019
Certain casks in the main cask repository may be invalid, for whatever
reason. Without handling this exception, the user will get a cask-related
exception while the formula of the same name is installed, and their
installation will abort half-completed.

Fixes #5709.
@lock lock bot added the outdated PR was locked due to age label Mar 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

1 participant