diff --git a/Formula/gdu.rb b/Formula/gdu.rb index b54b8ebf8957..7bc9188f504e 100644 --- a/Formula/gdu.rb +++ b/Formula/gdu.rb @@ -6,13 +6,14 @@ class Gdu < Formula license "MIT" bottle do - sha256 cellar: :any_skip_relocation, arm64_ventura: "d9721f1222d207b6c10641323b64fb5f05f6177c7db161e0dc8ad2cdc4e5efce" - sha256 cellar: :any_skip_relocation, arm64_monterey: "d9721f1222d207b6c10641323b64fb5f05f6177c7db161e0dc8ad2cdc4e5efce" - sha256 cellar: :any_skip_relocation, arm64_big_sur: "d9721f1222d207b6c10641323b64fb5f05f6177c7db161e0dc8ad2cdc4e5efce" - sha256 cellar: :any_skip_relocation, ventura: "212c209350ab233d1bb6edb37b10df7a45ebaab214e44434e7343c8fbdc02ffb" - sha256 cellar: :any_skip_relocation, monterey: "212c209350ab233d1bb6edb37b10df7a45ebaab214e44434e7343c8fbdc02ffb" - sha256 cellar: :any_skip_relocation, big_sur: "212c209350ab233d1bb6edb37b10df7a45ebaab214e44434e7343c8fbdc02ffb" - sha256 cellar: :any_skip_relocation, x86_64_linux: "a58b3dad1cc6ec6e264ce3f66efcae4f76a96641621368d0195f8673aba42328" + rebuild 1 + sha256 cellar: :any_skip_relocation, arm64_ventura: "7ddc42b8da31e35f87c722fe3c1912e338b15e4af553e1d0bb1d8ac7a4dd600e" + sha256 cellar: :any_skip_relocation, arm64_monterey: "7ddc42b8da31e35f87c722fe3c1912e338b15e4af553e1d0bb1d8ac7a4dd600e" + sha256 cellar: :any_skip_relocation, arm64_big_sur: "7ddc42b8da31e35f87c722fe3c1912e338b15e4af553e1d0bb1d8ac7a4dd600e" + sha256 cellar: :any_skip_relocation, ventura: "aa1ba23f987df2ec8403887234196d7d548819f4725935e4333ed9802d6bacae" + sha256 cellar: :any_skip_relocation, monterey: "aa1ba23f987df2ec8403887234196d7d548819f4725935e4333ed9802d6bacae" + sha256 cellar: :any_skip_relocation, big_sur: "aa1ba23f987df2ec8403887234196d7d548819f4725935e4333ed9802d6bacae" + sha256 cellar: :any_skip_relocation, x86_64_linux: "6830146fdaba73d2c0bd32cfd4de1fcd9f1c5d3b097acd6fa0d062ad81a3e5e5" end depends_on "go" => :build @@ -30,7 +31,13 @@ def install -X "github.com/dundee/gdu/v#{major}/build.User=#{user}" ] - system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/gdu" + system "go", "build", *std_go_args(ldflags: ldflags, output: "#{bin}/gdu-go"), "./cmd/gdu" + end + + def caveats + <<~EOS + To avoid a conflict with `coreutils`, `gdu` has been installed as `gdu-go`. + EOS end test do @@ -38,8 +45,9 @@ def install (testpath/"test_dir"/"file1").write "hello" (testpath/"test_dir"/"file2").write "brew" - assert_match version.to_s, shell_output("#{bin}/gdu -v") - assert_match "colorized", shell_output("#{bin}/gdu --help 2>&1") - assert_match "4.0 KiB file1", shell_output("#{bin}/gdu --non-interactive --no-progress #{testpath}/test_dir 2>&1") + assert_match version.to_s, shell_output("#{bin}/gdu-go -v") + assert_match "colorized", shell_output("#{bin}/gdu-go --help 2>&1") + output = shell_output("#{bin}/gdu-go --non-interactive --no-progress #{testpath}/test_dir 2>&1") + assert_match "4.0 KiB file1", output end end