test-bot: simplify Test#git
This commit is contained in:
parent
b73a6f195a
commit
b32d21fea0
@ -241,22 +241,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def git(*args)
|
def git(*args)
|
||||||
rd, wr = IO.pipe
|
@repository.cd { Utils.popen_read("git", *args) }
|
||||||
|
|
||||||
pid = fork do
|
|
||||||
rd.close
|
|
||||||
STDERR.reopen("/dev/null")
|
|
||||||
STDOUT.reopen(wr)
|
|
||||||
wr.close
|
|
||||||
Dir.chdir @repository
|
|
||||||
exec("git", *args)
|
|
||||||
end
|
|
||||||
wr.close
|
|
||||||
Process.wait(pid)
|
|
||||||
|
|
||||||
rd.read
|
|
||||||
ensure
|
|
||||||
rd.close
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def download
|
def download
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user