Skip to content

Commit

Permalink
Merge pull request #178009 from branchvincent/cargo-fuzz
Browse files Browse the repository at this point in the history
cargo-fuzz: use `rustup`
  • Loading branch information
chenrui333 authored Jul 22, 2024
2 parents 1572d96 + f52938e commit 2f443cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Formula/c/cargo-fuzz.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CargoFuzz < Formula
end

depends_on "rust" => :build
depends_on "rustup-init" => :test
depends_on "rustup" => :test

def install
system "cargo", "install", *std_cargo_args
Expand All @@ -25,10 +25,9 @@ def install
test do
# Show that we can use a different toolchain than the one provided by the `rust` formula.
# https://github.com/Homebrew/homebrew-core/pull/134074#pullrequestreview-1484979359
ENV["RUSTUP_INIT_SKIP_PATH_CHECK"] = "yes"
rustup_init = Formula["rustup-init"].bin/"rustup-init"
system rustup_init, "-y", "--profile", "minimal", "--default-toolchain", "beta", "--no-modify-path"
ENV.prepend_path "PATH", HOMEBREW_CACHE/"cargo_cache/bin"
ENV.prepend_path "PATH", Formula["rustup"].bin
system "rustup", "default", "beta"
system "rustup", "set", "profile", "minimal"

system "cargo", "init"
system "#{bin}/cargo-fuzz", "init"
Expand Down

0 comments on commit 2f443cf

Please sign in to comment.