Update Homebrew cask to use postflight_steps · Issue #590 · zigflow/zigflow · GitHub
Skip to content

Update Homebrew cask to use postflight_steps #590

Closed

Description

@mrsimonemms

Homebrew emits a deprecation warning when installing Zigflow via the cask:

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

This currently appears when running:

brew install --cask zigflow

The cask should be updated to replace the deprecated postflight stanza with
the supported postflight_steps equivalent.

Acceptance criteria

  • zigflow.rb no longer uses the deprecated postflight stanza
  • brew install --cask zigflow completes without the deprecation warning
  • Existing post-install behaviour is unchanged

Activity

  1. mrsimonemms commented on Sep 17, 2026

    @mrsimonemms
    CollaboratorAuthor
  2. mrsimonemms commented on Sep 17, 2026

    @mrsimonemms
    CollaboratorAuthor

    Blocked by goreleaser/goreleaser#6873.

    Once released, migrate homebrew_casks.hooks.post.install to
    homebrew_casks.hooks.post.install_steps so GoReleaser generates
    postflight_steps instead of the deprecated postflight stanza.

  3. YJ-928 commented on Oct 23, 2026

    @YJ-928
    Member

    goreleaser/goreleaser#6873 shipped in GoReleaser v2.19.0 (2026-10-22), so this is unblocked, and it is now also breaking CI: build.yml uses version: "~> v2", and goreleaser check exits 2 on the deprecated homebrew_casks.hooks.post.install, so both verify-goreleaser jobs fail on main (c03e92f) and on every PR (first seen on #637).

    The new install_steps take Homebrew's declarative steps, not Ruby, and there is no CPU guard. The cask only stages the binary for the user's CPU, so if_path_exists keeps today's behaviour:

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

    @mrsimonemms I can open the PR with this, checked with goreleaser check and a snapshot of the generated cask. It still needs one brew install --cask zigflow on a Mac before release.

  4. mrsimonemms commented on Oct 23, 2026

    @mrsimonemms
    CollaboratorAuthor

    Yes please @YJ-928

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

    never-stalev1Required to put Zigflow into GA

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions