Skip to content

Commit

Permalink
Merge pull request #179322 from Homebrew/x-interpolated-bin-audit
Browse files Browse the repository at this point in the history
x*: Stop interpolating `bin`
  • Loading branch information
chenrui333 authored Aug 1, 2024
2 parents 62890a4 + 3bff0d5 commit 2d0f0e3
Show file tree
Hide file tree
Showing 20 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Formula/x/xa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def install
test do
(testpath/"foo.a").write "jsr $ffd2\n"

system "#{bin}/xa", "foo.a"
system bin/"xa", "foo.a"
code = File.open("a.o65", "rb") { |f| f.read.unpack("C*") }
assert_equal [0x20, 0xd2, 0xff], code
end
Expand Down
2 changes: 1 addition & 1 deletion Formula/x/xaric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def install
test do
require "pty"
output = ""
PTY.spawn("#{bin}/xaric", "-v") do |r, _w, _pid|
PTY.spawn(bin/"xaric", "-v") do |r, _w, _pid|
r.each_line { |line| output += line }
rescue Errno::EIO
# GNU/Linux raises EIO when read is done on closed pty
Expand Down
2 changes: 1 addition & 1 deletion Formula/x/xclip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ def install
end

test do
system "#{bin}/xclip", "-version"
system bin/"xclip", "-version"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xcode-build-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def install
end

test do
system "#{bin}/xcode-build-server", "--help"
system bin/"xcode-build-server", "--help"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xcproj.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ def caveats
end

test do
system "#{bin}/xcproj", "--version"
system bin/"xcproj", "--version"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xcv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def install
end

test do
system "#{bin}/xcv"
system bin/"xcv"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xdotool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def caveats
end

test do
system "#{bin}/xdotool", "--version"
system bin/"xdotool", "--version"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xhyve.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def install
end

test do
system "#{bin}/xhyve", "-v"
system bin/"xhyve", "-v"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xml2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ def install
end

test do
assert_equal "/test", pipe_output("#{bin}/xml2", "<test/>", 0).chomp
assert_equal "/test", pipe_output(bin/"xml2", "<test/>", 0).chomp
end
end
2 changes: 1 addition & 1 deletion Formula/x/xmlcatmgr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ def install
end

test do
system "#{bin}/xmlcatmgr", "-v"
system bin/"xmlcatmgr", "-v"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xmlformat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def install
end

test do
system "#{bin}/xmlformat", "--version"
system bin/"xmlformat", "--version"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xmlrpc-c.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ def install
end

test do
system "#{bin}/xmlrpc-c-config", "--features"
system bin/"xmlrpc-c-config", "--features"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xmlsectool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ def install
end

test do
system "#{bin}/xmlsectool", "--listAlgorithms"
system bin/"xmlsectool", "--listAlgorithms"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xmlstarlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def install
end

test do
system "#{bin}/xmlstarlet", "--version"
system bin/"xmlstarlet", "--version"
end
end
16 changes: 8 additions & 8 deletions Formula/x/xplanet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ def install

# Test all the supported image formats, jpg, png, gif and tiff, as well as the -num_times 2 patch
test do
system "#{bin}/xplanet", "-target", "earth", "-output", "#{testpath}/test.jpg",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
system "#{bin}/xplanet", "-target", "earth", "--transpng", "#{testpath}/test.png",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
system "#{bin}/xplanet", "-target", "earth", "--output", "#{testpath}/test.gif",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
system "#{bin}/xplanet", "-target", "earth", "--output", "#{testpath}/test.tiff",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
system bin/"xplanet", "-target", "earth", "-output", "#{testpath}/test.jpg",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
system bin/"xplanet", "-target", "earth", "--transpng", "#{testpath}/test.png",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
system bin/"xplanet", "-target", "earth", "--output", "#{testpath}/test.gif",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
system bin/"xplanet", "-target", "earth", "--output", "#{testpath}/test.tiff",
"-radius", "30", "-num_times", "2", "-random", "-wait", "1"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xrootd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def install
end

test do
system "#{bin}/xrootd", "-H"
system bin/"xrootd", "-H"
system "python3.12", "-c", <<~EOS
import XRootD
from XRootD import client
Expand Down
2 changes: 1 addition & 1 deletion Formula/x/xsane.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ def install
# (xsane:27015): Gtk-WARNING **: 12:58:53.105: cannot open display
return if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]

system "#{bin}/xsane", "--version"
system bin/"xsane", "--version"
end
end
2 changes: 1 addition & 1 deletion Formula/x/xsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def install
return 0;
}
EOS
system "#{bin}/xsd", "cxx-tree", schema
system bin/"xsd", "cxx-tree", schema
assert_predicate testpath/"meaningoflife.hxx", :exist?
assert_predicate testpath/"meaningoflife.cxx", :exist?
system ENV.cxx, "-o", "xsdtest", "xsdtest.cxx", "meaningoflife.cxx", "-std=c++11",
Expand Down
2 changes: 1 addition & 1 deletion Formula/x/xurls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def install
end

test do
output = pipe_output("#{bin}/xurls", "Brew test with https://brew.sh.")
output = pipe_output(bin/"xurls", "Brew test with https://brew.sh.")
assert_equal "https://brew.sh", output.chomp

output = pipe_output("#{bin}/xurls --fix", "Brew test with http://brew.sh.")
Expand Down
2 changes: 1 addition & 1 deletion Formula/x/xxh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def install
end

stdout, stderr, = Open3.capture3(
"#{bin}/xxh", "test.localhost",
bin/"xxh", "test.localhost",
"-p", port.to_s,
"+xc", "#{testpath}/config.xxhc",
"+v"
Expand Down

0 comments on commit 2d0f0e3

Please sign in to comment.