Skip to content

fix(init): CI で落ちていた brew bundle の2つの失敗を修正 - #29

Merged
ebkn merged 1 commit into
mainfrom
fix/ci
Aug 13, 2026
Merged

fix(init): CI で落ちていた brew bundle の2つの失敗を修正#29
ebkn merged 1 commit into
mainfrom
fix/ci

Conversation

@ebkn

@ebkn ebkn commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

macOS / Ubuntu / WSL の setup workflow が揃って brew bundle で落ちていた。原因は無関係な2つ。

Changes

macOS: tflint が homebrew-core から消えた

homebrew-core が 2026-05-13 に BUSL 再ライセンスを理由に tflint を削除しており、brew 'tflint'No available formula with the name "tflint" になる(formula API も 404)。

upstream の terraform-linters/tapcask しか提供しておらず、これを使うと

  • macOS 限定になり Ubuntu / WSL では引き続き入らない
  • サードパーティ tap の cask は Homebrew に拒否される(実際に Refusing to load cask ... from untrusted tap を確認)。CI は非対話なので brew trust を仕込まない限り落ちる

そのため go install github.com/terraform-linters/tflint@latest に変更した。すぐ数行上の terraform-ls / tfsec と同じ方式で、Linux でも tflint が復活する。ローカルで v0.64.0(cask と同版)の動作を確認済み。

Ubuntu / WSL: Homebrew 自体が古い

runner にプリインストールされた Homebrew は auto-update が無効で、formula JSON API のスキーマより古いと unknown install step: runca-certificates の pour 中に落ちる。これで tmuxgnupg が巻き添えになっていた。

スクリプトは brew upgrade は呼ぶが brew update を呼んでいなかったため Homebrew 本体が更新されない。update_homebrew()common.sh に追加し、3つの platform script から呼ぶようにした。

その他

zsh/alias.zshupdate-all にも tflint を追加(init script のコメントが「このリストと揃えろ」と指示しているため)。

Concerns

  • 1コミットにまとめてある。 原因は独立した2つだが、各 init script が両方の hunk を1ファイル内に持つため、ファイル単位では分割できなかった。コミットメッセージでは2つを分けて記述している。
  • 検証は bin/lint-shell(CI と同じコマンド)と brew bundle list によるパース確認、および go install した tflint の実行確認まで。実際に通るかは CI の結果待ち。
  • 既存の Mac には削除前の古い tflint formula が残っている可能性がある。go 版を PATH で優先させる前に brew uninstall tflint が必要。

References

Both setup workflows died in `brew bundle`, for unrelated reasons.

macOS: homebrew-core deleted tflint on 2026-05-13 over its BUSL relicense,
so `brew 'tflint'` now resolves to nothing ("No available formula"). The
upstream tap only ships a cask, which would be macOS-only and needs
`brew trust` for a third-party tap. Installing it with `go install`
instead keeps tflint on Linux too and matches how terraform-ls and tfsec
are already installed a few lines away.

Ubuntu/WSL: the runners ship a preinstalled Homebrew with auto-update
disabled. When it is older than the formula JSON API's schema it aborts
mid-pour with "unknown install step: run", which took out tmux and gnupg.
The scripts ran `brew upgrade` but never `brew update`, so Homebrew itself
stayed stale; update_homebrew() now does both.
@ebkn
ebkn merged commit cb37eb1 into main Aug 13, 2026
6 of 7 checks passed
@ebkn
ebkn deleted the fix/ci branch August 13, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant