Skip to content

Commit 30c3d2d

Browse files
authored
Merge pull request #196794 from Homebrew/twty-test
twty: update test, disable on 2025-01-01
2 parents 7bc4894 + bf9e524 commit 30c3d2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Formula/t/twty.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Twty < Formula
2020

2121
# see discussions in https://github.com/mattn/twty/issues/28
2222
# and https://github.com/orakaro/rainbowstream/issues/342
23-
deprecate! date: "2024-08-18", because: "uses the old, unsupported Twitter API"
23+
disable! date: "2025-01-01", because: "uses the old, unsupported Twitter API"
2424

2525
depends_on "go" => :build
2626

@@ -37,12 +37,12 @@ def install
3737

3838
# twty requires PIN code from stdin and putting nothing to stdin to make authentication failed
3939
require "pty"
40-
PTY.spawn(bin/"twty") do |r, w, _pid|
40+
PTY.spawn(bin/"twty") do |r, _w, pid|
4141
output = r.gets
4242
assert_match "cannot request temporary credentials: OAuth server status 401", output
4343
assert_match "{\"errors\":[{\"code\":32,\"message\":\"Could not authenticate you.\"}]}", output
44-
w.puts
45-
sleep 1 # Wait for twty exiting
44+
ensure
45+
Process.kill "TERM", pid
4646
end
4747
end
4848
end

0 commit comments

Comments
 (0)