Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Formula/rute-bayar.rb
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
class RuteBayar < Formula
desc "Payment router CLI and webhook daemon for Indonesian payment gateways"
homepage "https://github.com/pendig/rute-bayar"
version "0.1.8"
version "0.1.10"
license "MIT"

on_macos do
if Hardware::CPU.arm?
url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-darwin-arm64"
sha256 "f01ede6cab4b3f432295fd5bd7368701a279bab552094ee1525ca54d5e6dca6e"
url "https://github.com/pendig/rute-bayar/releases/download/v\#{version}/rutebayar-darwin-arm64"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The backslash before the # escapes the string interpolation in Ruby. This will cause the URL to literally contain \#{version} instead of the actual version number, leading to a 404 error when Homebrew attempts to download the binary. Remove the backslash to allow proper string interpolation.

      url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-darwin-arm64"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore version interpolation in download URLs

Because the # is escaped here, Ruby treats v\#{version} as a literal string rather than interpolating version; the same pattern is used for all four platform URLs in this formula. Any brew install rute-bayar on macOS or Linux will therefore request GitHub paths containing the literal #{version} and fail with a 404 before checksum verification.

Useful? React with 👍 / 👎.

sha256 "83876d8b413fcd2ab224f99f2dcbb30f134b14964ad84b127cd99d3e0a377642"
else
url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-darwin-amd64"
sha256 "a04c56c75bdd92775cdad5aaaa7aa06b521f663523b96bd45a5190478bffa175"
url "https://github.com/pendig/rute-bayar/releases/download/v\#{version}/rutebayar-darwin-amd64"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The backslash before the # escapes the string interpolation in Ruby. This will cause the URL to literally contain \#{version} instead of the actual version number, leading to a 404 error when Homebrew attempts to download the binary. Remove the backslash to allow proper string interpolation.

      url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-darwin-amd64"

sha256 "5e65ffea50630e1a2c632f86394c72ceeafae161b6b7cd32009c9181cf756d85"
end
end

on_linux do
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit?
url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-linux-arm64"
sha256 "aa6aa2a8454192e879da7d2ff4ee97e1b51f5669b11c9f0cfd508a0cffb3896a"
url "https://github.com/pendig/rute-bayar/releases/download/v\#{version}/rutebayar-linux-arm64"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The backslash before the # escapes the string interpolation in Ruby. This will cause the URL to literally contain \#{version} instead of the actual version number, leading to a 404 error when Homebrew attempts to download the binary. Remove the backslash to allow proper string interpolation.

      url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-linux-arm64"

sha256 "ab97666d3642f1372de2ff637aeefc34dd2169be14ae860ca6056e8a156e1eac"
else
url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-linux-amd64"
sha256 "a0c7c48fe0467fff629689b5c4df6ad15ebe03a6bd174bdab2110022cc5bdf70"
url "https://github.com/pendig/rute-bayar/releases/download/v\#{version}/rutebayar-linux-amd64"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The backslash before the # escapes the string interpolation in Ruby. This will cause the URL to literally contain \#{version} instead of the actual version number, leading to a 404 error when Homebrew attempts to download the binary. Remove the backslash to allow proper string interpolation.

      url "https://github.com/pendig/rute-bayar/releases/download/v#{version}/rutebayar-linux-amd64"

sha256 "3117a6762740d986ee46079a1257f87b7270a930c09477fc2f702e8e7c46c51a"
end
end

Expand Down