Skip to content

Commit

Permalink
Merge pull request #179339 from Homebrew/f-interpolated-bin-audit
Browse files Browse the repository at this point in the history
f*: Stop interpolating `bin`
  • Loading branch information
p-linnane authored Aug 1, 2024
2 parents d287836 + 7235d8b commit be4e47e
Show file tree
Hide file tree
Showing 44 changed files with 47 additions and 47 deletions.
2 changes: 1 addition & 1 deletion Formula/f/fabio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def port_open?(ip_address, port, seconds = 1)
sleep 30
end
fork do
exec "#{bin}/fabio"
exec bin/"fabio"
end
sleep 10
assert_equal true, port_open?(localhost_ip, fabio_default_port)
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/fabric-installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def install
end

test do
system "#{bin}/fabric-installer", "server"
system bin/"fabric-installer", "server"
assert_predicate testpath/"fabric-server-launch.jar", :exist?
end
end
2 changes: 1 addition & 1 deletion Formula/f/fastd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ def install
end

test do
system "#{bin}/fastd", "--generate-key"
system bin/"fastd", "--generate-key"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fastjar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def install
end

test do
system "#{bin}/fastjar", "-V"
system bin/"fastjar", "-V"
system "#{bin}/grepjar", "-V"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fastme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def install
D 4.0 5.0 6.0 0.0
EOS

system "#{bin}/fastme", "-i", "test.dist"
system bin/"fastme", "-i", "test.dist"
assert_predicate testpath/"test.dist_fastme_tree.nwk", :exist?
end
end
2 changes: 1 addition & 1 deletion Formula/f/fasttext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def install

test do
(testpath/"trainingset").write("__label__brew brew")
system "#{bin}/fasttext", "supervised", "-input", "trainingset", "-output", "model"
system bin/"fasttext", "supervised", "-input", "trainingset", "-output", "model"
assert_predicate testpath/"model.bin", :exist?
end
end
2 changes: 1 addition & 1 deletion Formula/f/fatsort.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def install
end

test do
system "#{bin}/fatsort", "--version"
system bin/"fatsort", "--version"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fceux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ def install
# "This application failed to start because no Qt platform plugin could be initialized."
ENV["QT_QPA_PLATFORM"] = "minimal" if OS.linux? && ENV["HOMEBREW_GITHUB_ACTIONS"]

system "#{bin}/fceux", "--help"
system bin/"fceux", "--help"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fetchmail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ def install
end

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

system "#{bin}/ffe", "-c", "test.rc", "source"
system bin/"ffe", "-c", "test.rc", "source"
end
end
2 changes: 1 addition & 1 deletion Formula/f/ffind.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def install
end

test do
system "#{bin}/ffind"
system bin/"ffind"
end
end
2 changes: 1 addition & 1 deletion Formula/f/ffmpeg2theora.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ def install
end

test do
system "#{bin}/ffmpeg2theora", "--help"
system bin/"ffmpeg2theora", "--help"
end
end
2 changes: 1 addition & 1 deletion Formula/f/ffmpegthumbnailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def install
system f.to_s, "-loop", "1", "-i", png.to_s, "-c:v", "libx264", "-t", "30",
"-pix_fmt", "yuv420p", "v.mp4"
assert_predicate testpath/"v.mp4", :exist?, "Failed to generate source video!"
system "#{bin}/ffmpegthumbnailer", "-i", "v.mp4", "-o", "out.jpg"
system bin/"ffmpegthumbnailer", "-i", "v.mp4", "-o", "out.jpg"
assert_predicate testpath/"out.jpg", :exist?, "Failed to create thumbnail!"
end
end
2 changes: 1 addition & 1 deletion Formula/f/ffsend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def install
end

test do
system "#{bin}/ffsend", "help"
system bin/"ffsend", "help"

(testpath/"file.txt").write("test")
url = shell_output("#{bin}/ffsend upload -Iq #{testpath}/file.txt").strip
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/fig2dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def install
end

test do
system "#{bin}/fig2dev", "-L", "png", "#{pkgshare}/patterns.fig", "patterns.png"
system bin/"fig2dev", "-L", "png", "#{pkgshare}/patterns.fig", "patterns.png"
assert_predicate testpath/"patterns.png", :exist?, "Failed to create PNG"
end
end
2 changes: 1 addition & 1 deletion Formula/f/figlet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ def install
end

test do
system "#{bin}/figlet", "-f", "larry3d", "hello, figlet"
system bin/"figlet", "-f", "larry3d", "hello, figlet"
end
end
2 changes: 1 addition & 1 deletion Formula/f/filebeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def install
(testpath/"data").mkpath

fork do
exec "#{bin}/filebeat", "-c", "#{testpath}/filebeat.yml",
exec bin/"filebeat", "-c", "#{testpath}/filebeat.yml",
"-path.config", "#{testpath}/filebeat",
"-path.home=#{testpath}",
"-path.logs", "#{testpath}/log",
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/fio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def install
end

test do
system "#{bin}/fio", "--parse-only"
system bin/"fio", "--parse-only"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fish.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ def post_install
end

test do
system "#{bin}/fish", "-c", "echo"
system bin/"fish", "-c", "echo"
end
end
4 changes: 2 additions & 2 deletions Formula/f/fizmo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def install
end

test do
system "#{bin}/fizmo-console", "--help"
system bin/"fizmo-console", "--help"
# Unable to test headless ncursew client
# https://github.com/Homebrew/homebrew-games/pull/366
# system "#{bin}/fizmo-ncursesw", "--help"
system "#{bin}/fizmo-sdl2", "--help"
system bin/"fizmo-sdl2", "--help"
end
end
4 changes: 2 additions & 2 deletions Formula/f/flac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def install
end

test do
system "#{bin}/flac", "--decode", "--force-raw", "--endian=little", "--sign=signed",
system bin/"flac", "--decode", "--force-raw", "--endian=little", "--sign=signed",
"--output-name=out.raw", test_fixtures("test.flac")
system "#{bin}/flac", "--endian=little", "--sign=signed", "--channels=1", "--bps=8",
system bin/"flac", "--endian=little", "--sign=signed", "--channels=1", "--bps=8",
"--sample-rate=8000", "--output-name=out.flac", "out.raw"
end
end
2 changes: 1 addition & 1 deletion Formula/f/flac123.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def install

test do
driver = OS.mac? ? "macosx" : "oss"
system "#{bin}/flac123", "-d=#{driver}"
system bin/"flac123", "-d=#{driver}"
end
end
2 changes: 1 addition & 1 deletion Formula/f/flactag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ def install
end

test do
system "#{bin}/flactag"
system bin/"flactag"
end
end
2 changes: 1 addition & 1 deletion Formula/f/flamebearer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def install

assert_match "Processed V8 log",
pipe_output(
"#{bin}/flamebearer",
bin/"flamebearer",
shell_output("#{Formula["node"].bin}/node --prof-process --preprocess -j #{logs.join(" ")}"),
)

Expand Down
2 changes: 1 addition & 1 deletion Formula/f/flex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def install
yylex();
}
EOS
system "#{bin}/flex", "test.flex"
system bin/"flex", "test.flex"
system ENV.cc, "lex.yy.c", "-L#{lib}", "-lfl", "-o", "test"
assert_equal shell_output("echo \"Hello World\" | ./test"), <<~EOS
Hello
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def install
end

test do
system "#{bin}/flow", "init", testpath
system bin/"flow", "init", testpath
(testpath/"test.js").write <<~EOS
/* @flow */
var x: string = 123;
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/flowgrind.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ def install
end

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

test do
system "#{bin}/flvstreamer", "-h"
system bin/"flvstreamer", "-h"
end
end
2 changes: 1 addition & 1 deletion Formula/f/flyway.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ def install
end

test do
system "#{bin}/flyway", "-url=jdbc:h2:mem:flywaydb", "validate"
system bin/"flyway", "-url=jdbc:h2:mem:flywaydb", "validate"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def install

test do
assert_match version.to_s, shell_output("#{bin}/fn --version")
system "#{bin}/fn", "init", "--runtime", "go", "--name", "myfunc"
system bin/"fn", "init", "--runtime", "go", "--name", "myfunc"
assert_predicate testpath/"func.go", :exist?, "expected file func.go doesn't exist"
assert_predicate testpath/"func.yaml", :exist?, "expected file func.yaml doesn't exist"
port = free_port
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/foma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ def install
apply down> abrakadabra
EOS

system "#{bin}/foma", "-f", "toysyllabify.script"
system bin/"foma", "-f", "toysyllabify.script"
end
end
2 changes: 1 addition & 1 deletion Formula/f/foremost.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ def install
end

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

test do
system "#{bin}/format-udf", "-h"
system bin/"format-udf", "-h"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fortune.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def install
end

test do
system "#{bin}/fortune"
system bin/"fortune"
end
end

Expand Down
2 changes: 1 addition & 1 deletion Formula/f/fossil.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ def install
end

test do
system "#{bin}/fossil", "init", "test"
system bin/"fossil", "init", "test"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def install
end.
EOS
(testpath/"hello.pas").write(hello)
system "#{bin}/fpc", "hello.pas"
system bin/"fpc", "hello.pas"
assert_equal "Hello Homebrew", shell_output("./hello").strip
end
end
4 changes: 2 additions & 2 deletions Formula/f/fprettify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def install
end

test do
system "#{bin}/fprettify", "--version"
system bin/"fprettify", "--version"
(testpath/"test.f90").write <<~EOS
program demo
integer :: endif,if,elseif
Expand All @@ -48,7 +48,7 @@ def install
endif
end program
EOS
system "#{bin}/fprettify", testpath/"test.f90"
system bin/"fprettify", testpath/"test.f90"
ENV.fortran
system ENV.fc, testpath/"test.f90", "-o", testpath/"test"
system testpath/"test"
Expand Down
2 changes: 1 addition & 1 deletion Formula/f/freeswitch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,6 @@ def install
end

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

test do
assert_match "65536", pipe_output("#{bin}/frege-repl", "println $ 64*1024\n:quit\n")
assert_match "65536", pipe_output(bin/"frege-repl", "println $ 64*1024\n:quit\n")
end
end
2 changes: 1 addition & 1 deletion Formula/f/frugal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def install

test do
(testpath/"test.frugal").write("typedef double Test")
system "#{bin}/frugal", "--gen", "go", "test.frugal"
system bin/"frugal", "--gen", "go", "test.frugal"
assert_match "type Test float64", (testpath/"gen-go/test/f_types.go").read
end
end
2 changes: 1 addition & 1 deletion Formula/f/fsevent_watch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ def install
end

test do
system "#{bin}/fsevent_watch", "--version"
system bin/"fsevent_watch", "--version"
end
end
2 changes: 1 addition & 1 deletion Formula/f/fuseki.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ def post_install
end

test do
system "#{bin}/fuseki-server", "--version"
system bin/"fuseki-server", "--version"
end
end
2 changes: 1 addition & 1 deletion Formula/f/futhark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def install
(testpath/"test.fut").write <<~EOS
def main (n: i32) = reduce (*) 1 (1...n)
EOS
system "#{bin}/futhark", "c", "test.fut"
system bin/"futhark", "c", "test.fut"
assert_equal "3628800i32", pipe_output("./test", "10", 0).chomp
end
end
2 changes: 1 addition & 1 deletion Formula/f/fwknop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ def install
test do
touch testpath/".fwknoprc"
chmod 0600, testpath/".fwknoprc"
system "#{bin}/fwknop", "--version"
system bin/"fwknop", "--version"
end
end

0 comments on commit be4e47e

Please sign in to comment.