From e6fd4a1803f530fce9dbec35a7b45407be1821d7 Mon Sep 17 00:00:00 2001 From: Anson Hoyt Date: Fri, 16 Jan 2026 21:38:56 -0500 Subject: [PATCH] Add HEAD support to formula + fix linting issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `head` block to allow installing from main branch: brew install --HEAD tobi/try/try The HEAD build includes lib/tui.rb and lib/fuzzy.rb which are required by the current codebase but not present in the v1.0.0 release. Also fixes pre-existing `brew audit` issues: ``` ❯ brew audit tobi/try/try tobi/try/try * Stable: `version 1.0.0` is redundant with version scanned from URL * line 6, col 3: `version` (line 6) should be put before `sha256` (line 5) * line 37, col 4: Final newline missing. Error: 3 problems in 1 formula detected. ``` --- Formula/try.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Formula/try.rb b/Formula/try.rb index 667632b..e147885 100644 --- a/Formula/try.rb +++ b/Formula/try.rb @@ -3,12 +3,17 @@ class Try < Formula homepage "https://github.com/tobi/try" url "https://github.com/tobi/try/archive/refs/tags/v1.0.0.tar.gz" sha256 "267f2b63561de396a8938c6f41e68e8cecc635d05c582a1f866c0bbf37676af2" - version "1.0.0" + + head "https://github.com/tobi/try.git", branch: "main" depends_on "ruby" def install bin.install "try.rb" => "try" + if build.head? + (bin/"lib").install "lib/tui.rb" + (bin/"lib").install "lib/fuzzy.rb" + end end def caveats @@ -28,4 +33,4 @@ def caveats test do system "#{bin}/try", "--help" end -end \ No newline at end of file +end