diff --git a/bin/init/common.sh b/bin/init/common.sh index cc7f171..4cac6ad 100644 --- a/bin/init/common.sh +++ b/bin/init/common.sh @@ -128,6 +128,14 @@ install_or_upgrade_homebrew_linux() { activate_brew_shellenv } +# Refresh Homebrew itself before touching any formula. CI runners ship a +# preinstalled Homebrew with auto-update disabled, and a Homebrew older than the +# formula JSON API's schema aborts mid-pour with "unknown install step: run". +update_homebrew() { + brew update + brew upgrade +} + install_or_upgrade_brew_formula() { local formula formula="$1" diff --git a/bin/init/macos.sh b/bin/init/macos.sh index 40dad53..0deca5d 100644 --- a/bin/init/macos.sh +++ b/bin/init/macos.sh @@ -78,7 +78,7 @@ fi export PATH="/usr/local/bin:$PATH" export PATH="/opt/homebrew/sbin:$PATH" export PATH="/opt/homebrew/bin:$PATH" -brew upgrade +update_homebrew brew doctor || true log_step "Homebrew installed" @@ -196,6 +196,7 @@ install_go_tool "github.com/mikefarah/yq/v4@latest" install_go_tool "github.com/x-motemen/ghq@latest" install_go_tool "github.com/cloudspannerecosystem/spanner-cli@latest" install_go_tool "github.com/aquasecurity/tfsec/cmd/tfsec@latest" +install_go_tool "github.com/terraform-linters/tflint@latest" install_go_tool "mvdan.cc/gofumpt@latest" install_go_tool "tailscale.com/cmd/tailscale@main" install_go_tool "tailscale.com/cmd/tailscaled@main" diff --git a/bin/init/ubuntu.sh b/bin/init/ubuntu.sh index 55b0056..40c165b 100644 --- a/bin/init/ubuntu.sh +++ b/bin/init/ubuntu.sh @@ -75,7 +75,7 @@ install_or_upgrade_git_repo "https://github.com/ebkn/dotfiles" "$DOTFILES_DIR" log_step "Installing Homebrew" install_or_upgrade_homebrew_linux -brew upgrade +update_homebrew brew doctor || true log_step "Installing Google Cloud CLI" @@ -113,6 +113,7 @@ install_go_tool "github.com/mikefarah/yq/v4@latest" install_go_tool "github.com/x-motemen/ghq@latest" install_go_tool "github.com/cloudspannerecosystem/spanner-cli@latest" install_go_tool "github.com/aquasecurity/tfsec/cmd/tfsec@latest" +install_go_tool "github.com/terraform-linters/tflint@latest" install_go_tool "mvdan.cc/gofumpt@latest" install_go_tool "tailscale.com/cmd/tailscale@main" install_go_tool "tailscale.com/cmd/tailscaled@main" diff --git a/bin/init/wsl.sh b/bin/init/wsl.sh index a763e3d..c5f14fb 100644 --- a/bin/init/wsl.sh +++ b/bin/init/wsl.sh @@ -131,7 +131,7 @@ install_or_upgrade_git_repo "https://github.com/ebkn/dotfiles" "$DOTFILES_DIR" log_step "Installing Homebrew" install_or_upgrade_homebrew_linux -brew upgrade +update_homebrew brew doctor || true log_step "Installing Google Cloud CLI" @@ -192,6 +192,7 @@ install_go_tool "github.com/mikefarah/yq/v4@latest" install_go_tool "github.com/x-motemen/ghq@latest" install_go_tool "github.com/cloudspannerecosystem/spanner-cli@latest" install_go_tool "github.com/aquasecurity/tfsec/cmd/tfsec@latest" +install_go_tool "github.com/terraform-linters/tflint@latest" install_go_tool "mvdan.cc/gofumpt@latest" link_with_backup "${DOTFILES_DIR}/.vimrc" "${HOME}/.vimrc" diff --git a/brewfiles/Brewfile-lang b/brewfiles/Brewfile-lang index 5c6b950..584fd97 100644 --- a/brewfiles/Brewfile-lang +++ b/brewfiles/Brewfile-lang @@ -15,8 +15,9 @@ brew 'hadolint' # ShellScript brew 'shellcheck' -# Terraform -brew 'tflint' +# Terraform: tflint relicensed to BUSL and was dropped from homebrew-core +# (2026-05-13), so it is installed via install_go_tool alongside terraform-ls +# and tfsec in the platform init scripts. # Java brew 'java' diff --git a/zsh/alias.zsh b/zsh/alias.zsh index bbfba11..4c87d23 100644 --- a/zsh/alias.zsh +++ b/zsh/alias.zsh @@ -529,6 +529,7 @@ update-all() { go install github.com/x-motemen/ghq@latest go install github.com/cloudspannerecosystem/spanner-cli@latest go install github.com/aquasecurity/tfsec/cmd/tfsec@latest + go install github.com/terraform-linters/tflint@latest go install mvdan.cc/gofumpt@latest go install tailscale.com/cmd/tailscale{,d}@main # --ignore-scripts=false overrides ~/.npmrc's global ignore-scripts=true: this