Skip to content

homebrew_casks hook emits Homebrew deprecated postflight stanza #37

Description

@johndfowler

Homebrew deprecated the postflight stanza that GoReleaser emits for homebrew_casks[].hooks.post.install. Every brew command that loads openstatushq/homebrew-cli/openstatus now prints:

Warning: Calling `postflight` is deprecated! Use `postflight_steps` instead.
Please report this issue to the openstatushq/homebrew-cli tap (not Homebrew/* repositories), or even better, submit a PR to fix it:
  /opt/homebrew/Library/Taps/openstatushq/homebrew-cli/Casks/openstatus.rb:37

The generated cask is produced from this repo's .goreleaser.yaml:

homebrew_casks:
  - hooks:
      post:
        install: |
          if system_command("/usr/bin/xattr", args: ["-h"]).exit_status == 0
            system_command "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "#{staged_path}/openstatus"]
          end

GoReleaser wraps that body in postflight do, and postflight_steps is not a rename of the same Ruby DSL. A tap-only edit will be overwritten on the next release.

Once goreleaser/goreleaser#6873 ships (milestone v2.19.0), this config should become something like:

hooks:
  post:
    install_steps: |
      on_macos do
        run "/usr/bin/xattr", args: ["-dr", "com.apple.quarantine", "{{ .StagedPath }}/openstatus"], must_succeed: false
      end

I reported this on the tap as well. Related: goreleaser/goreleaser#6870, terraform-linters/tflint#2643.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions