From ba308d75f16c86e40f13bb189d09fd0a7c67912c Mon Sep 17 00:00:00 2001 From: Zachary Whitley Date: Mon, 6 Jul 2026 20:32:18 -0400 Subject: [PATCH] fix(brew): install shell completions during brew install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit brew install wvm placed only the binary; no bash/zsh/fish completions were emitted because the formula never called the standard Homebrew helper. Add generate_completions_from_executable so a fresh install gets completions in the right per-shell locations. Also chmod 0755 the binary before running it — GitHub's release download strips the exec bit, and bin.install preserves that, so the helper's first call to `wvm completions bash` would EACCES otherwise. Same fix as tegmentum/wsvm@eefe4b4. --- Formula/wvm.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Formula/wvm.rb b/Formula/wvm.rb index 9c24450..ee3dfdf 100644 --- a/Formula/wvm.rb +++ b/Formula/wvm.rb @@ -38,8 +38,15 @@ class Wvm < Formula end def install - # The release asset is a bare binary named wvm--. + # The release asset is a bare binary named wvm--. GitHub's + # release download loses the exec bit, so restore it before running the + # binary to generate completions below. bin.install Dir["wvm-*"].first => "wvm" + chmod 0755, bin/"wvm" + # Emit and install completion scripts. `wvm completions ` prints + # the script to stdout — Homebrew's helper takes care of putting each + # generated file in the right per-shell location. + generate_completions_from_executable(bin/"wvm", "completions") end def caveats