Skip to content

Commit

Permalink
goproxy: avoid subshells
Browse files Browse the repository at this point in the history
This seems to make the test hang indefinitely (e.g. #90350). Let's also
sleep for longer since short `sleep`s tend to cause trouble in CI.
  • Loading branch information
carlocab committed Dec 8, 2021
1 parent 700949a commit 19ccb57
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Formula/goproxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ def install
test do
bind_address = "127.0.0.1:#{free_port}"
begin
server = IO.popen("#{bin}/goproxy -proxy=https://goproxy.io -listen=#{bind_address}", err: [:child, :out])
sleep 1
server = IO.popen(
["#{bin}/goproxy", "-proxy=https://goproxy.io", "-listen=#{bind_address}"],
err: [:child, :out],
)
sleep 10
ENV["GOPROXY"] = "http://#{bind_address}"
test_module = "github.com/spf13/cobra"
system "go", "get", test_module
Expand Down

0 comments on commit 19ccb57

Please sign in to comment.