From 2fc7e3b3db999fc2be304c3ac09c0a8ea18f80d2 Mon Sep 17 00:00:00 2001 From: Bjoern Danz Date: Sat, 8 Aug 2026 10:08:47 -0700 Subject: [PATCH] fix: keep Homebrew in control of Ori updates --- Formula/ori.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Formula/ori.rb b/Formula/ori.rb index efcf632..0dcdc10 100644 --- a/Formula/ori.rb +++ b/Formula/ori.rb @@ -16,10 +16,22 @@ class Ori < Formula def install binary = Hardware::CPU.arm? ? "ori-darwin-arm64" : "ori-darwin-x64" - bin.install binary => "ori" + libexec.install binary => "ori-homebrew" + chmod 0755, libexec/"ori-homebrew" + (bin/"ori").write_env_script libexec/"ori-homebrew", ORI_NO_UPDATE_CHECK: "1" + end + + def caveats + <<~EOS + This installation is managed by Homebrew. Upgrade it with: + brew upgrade ori + + Ori's built-in self-update mechanism is disabled for this installation. + EOS end test do + assert_match "ORI_NO_UPDATE_CHECK", (bin/"ori").read assert_match version.to_s, shell_output("#{bin}/ori --version") end end