tasksh: fix hang trying to read task from stdin

also update head branch to 1.2.0 and assert zero exit code in the test

Closes #7085.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
This commit is contained in:
ilovezfs 2016-11-21 00:49:26 -08:00
parent 6226b3bda7
commit a1ecbde2b2

View file

@ -1,9 +1,17 @@
class Tasksh < Formula
desc "Shell wrapper for Taskwarrior commands"
homepage "https://tasktools.org/projects/tasksh.html"
url "https://taskwarrior.org/download/tasksh-1.1.0.tar.gz"
sha256 "eef7c6677d6291b1c0e13595e8c9606d7f8dc1060d197a0d088cc1fddcb70024"
head "https://git.tasktools.org/scm/ex/tasksh.git"
head "https://git.tasktools.org/scm/ex/tasksh.git", :branch => "1.2.0"
stable do
url "https://taskwarrior.org/download/tasksh-1.1.0.tar.gz"
sha256 "eef7c6677d6291b1c0e13595e8c9606d7f8dc1060d197a0d088cc1fddcb70024"
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/71c6658/tasksh/tasksh-1.1.0-fix-hang.patch"
sha256 "02011f7cf6d2e74ba716a8e87d53a5e26986d75f4a39c69eb406c3c85b551e8b"
end
end
bottle do
cellar :any_skip_relocation
@ -25,6 +33,6 @@ class Tasksh < Formula
test do
system "#{bin}/tasksh", "--version"
(testpath/".taskrc").write "data.location=#{testpath}/.task\n"
assert_match(/Created task 1./, pipe_output("#{bin}/tasksh", "add Test Task"))
assert_match "Created task 1.", pipe_output("#{bin}/tasksh", "add Test Task", 0)
end
end