openstatusHQ / openstatusHQ/cli

homebrew_casks hook emits Homebrew deprecated postflight stanza

Open Beginner friendly
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
3
Forks
1
Avg merge
3m
Merged PRs (30d)
3

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in .goreleaser.yaml and review the homebrew_casks hooks.post.install configuration alongside GoReleaser PR #6873 and its v2.19.0 milestone. After the supported syntax is available, verify that generated casks use the replacement install-step form and no longer emit the deprecated postflight stanza or Homebrew warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
build-system, release
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.