Skip to content

Commit 5ce30fc

Browse files
chenrui333carlocab
andcommitted
lazycontainer 0.0.1 (new formula)
Signed-off-by: Rui Chen <[email protected]> lazycontainer: update desc Co-authored-by: Carlo Cabrera <[email protected]>
1 parent b818065 commit 5ce30fc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Formula/l/lazycontainer.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
class Lazycontainer < Formula
2+
desc "Terminal UI for Apple Containers"
3+
homepage "https://github.com/andreybleme/lazycontainer"
4+
url "https://github.com/andreybleme/lazycontainer/archive/refs/tags/v0.0.1.tar.gz"
5+
sha256 "c674297ccb1c3897865e4dd14d64ce7346f04f66430c125ad6c8bdfff0ba4228"
6+
license "MIT"
7+
head "https://github.com/andreybleme/lazycontainer.git", branch: "main"
8+
9+
depends_on "go" => :build
10+
11+
def install
12+
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd"
13+
end
14+
15+
test do
16+
require "pty"
17+
18+
PTY.spawn(bin/"lazycontainer") do |r, _w, pid|
19+
out = r.readpartial(1024)
20+
assert_match "Error listing containers", out
21+
rescue Errno::EIO
22+
# GNU/Linux raises EIO when read is done on closed pty
23+
ensure
24+
Process.kill("TERM", pid)
25+
Process.wait(pid)
26+
end
27+
end
28+
end

0 commit comments

Comments
 (0)