show cmd being executed
This commit is contained in:
parent
c003e805be
commit
c043a93bdf
@ -6,6 +6,7 @@ module Homebrew
|
|||||||
|
|
||||||
# Returns the output of running cmd, and asserts the exit status
|
# Returns the output of running cmd, and asserts the exit status
|
||||||
def shell_output(cmd, result=0)
|
def shell_output(cmd, result=0)
|
||||||
|
ohai cmd
|
||||||
output = `#{cmd}`
|
output = `#{cmd}`
|
||||||
assert_equal result, $?.exitstatus
|
assert_equal result, $?.exitstatus
|
||||||
output
|
output
|
||||||
@ -13,6 +14,7 @@ module Homebrew
|
|||||||
|
|
||||||
# Returns the output of running the cmd, with the optional input
|
# Returns the output of running the cmd, with the optional input
|
||||||
def pipe_output(cmd, input=nil)
|
def pipe_output(cmd, input=nil)
|
||||||
|
ohai cmd
|
||||||
IO.popen(cmd, "w+") do |pipe|
|
IO.popen(cmd, "w+") do |pipe|
|
||||||
pipe.write(input) unless input.nil?
|
pipe.write(input) unless input.nil?
|
||||||
pipe.close_write
|
pipe.close_write
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user