From a127063619188488be8879096eb985fd0e7872ce Mon Sep 17 00:00:00 2001 From: lublanski Date: Mon, 22 Sep 2025 20:57:58 -0300 Subject: [PATCH] fix(formula): install Spring Boot CLI jars into libexec Move the Spring Boot CLI jars from lib/ to libexec and create a wrapper script in bin. This removes the Homebrew warning shown when installing with HOMEBREW_DEVELOPER=true. The formula now follows the recommended pattern used by other Java formulae (e.g. activemq, jruby). Also adjusted completion installation to avoid "empty array" warnings when completion scripts are not present in the distribution tarball. Signed-off-by: lublanski --- spring-boot.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/spring-boot.rb b/spring-boot.rb index 43ce0bc..9ad6fe9 100644 --- a/spring-boot.rb +++ b/spring-boot.rb @@ -16,9 +16,14 @@ def install root = '.' end - bin.install Dir["#{root}/bin/spring"] - lib.install Dir["#{root}/lib/spring-boot-cli-*.jar"] - bash_completion.install Dir["#{root}/shell-completion/bash/spring"] - zsh_completion.install Dir["#{root}/shell-completion/zsh/_spring"] + libexec.install Dir["#{root}/*"] + + (bin/"spring").write_env_script libexec/"bin/spring", {} + + bash_comp = libexec/"shell-completion/bash/spring" + zsh_comp = libexec/"shell-completion/zsh/_spring" + + bash_completion.install bash_comp if bash_comp.exist? + zsh_completion.install zsh_comp if zsh_comp.exist? end end