Skip to content

Commit

Permalink
Merge pull request #179321 from Homebrew/v-interpolated-bin-audit
Browse files Browse the repository at this point in the history
v*: Stop interpolating `bin`
  • Loading branch information
chenrui333 authored Aug 1, 2024
2 parents 4e1184f + e680aa4 commit 62890a4
Show file tree
Hide file tree
Showing 18 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Formula/v/vala-language-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def install
"processId\":88075,\"rootPath\":\"#{testpath}\",\"capabilities\":{},\"trace\":\"ver" \
"bose\",\"workspaceFolders\":null}}\r\n"

output = pipe_output("#{bin}/vala-language-server", input, 0)
output = pipe_output(bin/"vala-language-server", input, 0)
assert_match(/^Content-Length: \d+/i, output)
end
end
2 changes: 1 addition & 1 deletion Formula/v/vassh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ def install
end

test do
system "#{bin}/vassh", "-h"
system bin/"vassh", "-h"
end
end
2 changes: 1 addition & 1 deletion Formula/v/vaulted.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def install
test do
(testpath/".local/share/vaulted").mkpath
touch(".local/share/vaulted/test_vault")
output = IO.popen(["#{bin}/vaulted", "ls"], &:read)
output = IO.popen([bin/"vaulted", "ls"], &:read)
output == "test_vault\n"
end
end
2 changes: 1 addition & 1 deletion Formula/v/vbindiff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ def install
end

test do
system "#{bin}/vbindiff", "-L"
system bin/"vbindiff", "-L"
end
end
2 changes: 1 addition & 1 deletion Formula/v/vc4asm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def install
add.unpack8ai r0, r4, ra1
add r0, r4.8a, ra1
EOS
system "#{bin}/vc4asm", "-o test.hex", "-V", "#{share}/vc4inc/vc4.qinc", "test.qasm"
system bin/"vc4asm", "-o test.hex", "-V", "#{share}/vc4inc/vc4.qinc", "test.qasm"
end
end
2 changes: 1 addition & 1 deletion Formula/v/vcprompt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ def install
end

test do
system "#{bin}/vcprompt"
system bin/"vcprompt"
end
end
4 changes: 2 additions & 2 deletions Formula/v/vdirsyncer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def install
END:VCARD
EOS
(testpath/".contacts/b/foo/").mkpath
system "#{bin}/vdirsyncer", "discover"
system "#{bin}/vdirsyncer", "sync"
system bin/"vdirsyncer", "discover"
system bin/"vdirsyncer", "sync"
assert_match "Ö φ 風 ض", (testpath/".contacts/b/foo/092a1e3b55.vcf").read
end
end
2 changes: 1 addition & 1 deletion Formula/v/verapdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def install
end

test do
with_env(VERAPDF: "#{bin}/verapdf", NO_CD: "1") do
with_env(VERAPDF: bin/"verapdf", NO_CD: "1") do
system prefix/"tests/exit-status.sh"
end
end
Expand Down
2 changes: 1 addition & 1 deletion Formula/v/vhs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def install
Sleep 1s
TAPE

system "#{bin}/vhs", "validate", "test.tape"
system bin/"vhs", "validate", "test.tape"

assert_match version.to_s, shell_output("#{bin}/vhs --version")
end
Expand Down
2 changes: 1 addition & 1 deletion Formula/v/video-compare.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def install
testvideo = test_fixtures("test.gif") # GIF is valid ffmpeg input format
begin
pid = fork do
exec "#{bin}/video-compare", testvideo, testvideo
exec bin/"video-compare", testvideo, testvideo
end
sleep 3
ensure
Expand Down
2 changes: 1 addition & 1 deletion Formula/v/viewvc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def install

begin
pid = fork do
exec "#{bin}/viewvc-standalone.py", "--port=#{port}"
exec bin/"viewvc-standalone.py", "--port=#{port}"
end
sleep 2

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

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

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

test do
system "#{bin}/vips", "-l"
system bin/"vips", "-l"
cmd = "#{bin}/vipsheader -f width #{test_fixtures("test.png")}"
assert_equal "8", shell_output(cmd).chomp

Expand Down
2 changes: 1 addition & 1 deletion Formula/v/vlmcsd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def caveats
assert_match "vlmcs", output
begin
pid = fork do
exec "#{bin}/vlmcsd", "-D"
exec bin/"vlmcsd", "-D"
end
# Run vlmcsd, then use vlmcs to check
# the running status of vlmcsd
Expand Down
2 changes: 1 addition & 1 deletion Formula/v/vmdktool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def install
# Create a blank disk image in raw format
system "dd", "if=/dev/zero", "of=blank.raw", "bs=512", "count=20480"
# Use vmdktool to convert to streamOptimized VMDK file
system "#{bin}/vmdktool", "-v", "blank.vmdk", "blank.raw"
system bin/"vmdktool", "-v", "blank.vmdk", "blank.raw"
# Inspect the VMDK with vmdktool
output = shell_output("#{bin}/vmdktool -i blank.vmdk")
assert_match "RDONLY 20480 SPARSE", output
Expand Down
2 changes: 1 addition & 1 deletion Formula/v/vorbisgain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ def install
end

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

test do
system "#{bin}/vpcs", "--version"
system bin/"vpcs", "--version"
end
end

0 comments on commit 62890a4

Please sign in to comment.