Skip to content

3rd party Cask - Error: ... Calling cask url do blocks is deprecated! There is no replacement. #5879

Discussion options

You must be logged in to vote

The deprecation message is a bit misleading, you can still have some more complex logic for the url block. The logic just needs to be moved into a separate function. For example, making a contrived example out of the existing acorn cask:

cask "acorn" do
  # [...]
  def construct_url
    app_name = "A" + "c" + "o" + "r" + "n"
    "https://flyingmeat.com/download/#{app_name}-#{version}.zip"
  end

  url construct_url # calls construct_url and passes the return value of it as an input to url
  # [...]
end

For your pcloud-drive cask, a refactoring to something like the following might work (I have not tested this with pcloud-drive in particular):

cask "pcloud-drive" do
  # [...]
  def constru…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@trinitronx
Comment options

Answer selected by trinitronx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants