Skip to content

Commit

Permalink
Fix long time bug in shell commands
Browse files Browse the repository at this point in the history
Running a Shell command with the built in shell utility only returns
a single line of the result on either STDOUT or STDERR. This commit
fixes this to return all output from the running of a command or
commands.
  • Loading branch information
Christopher Frost committed Apr 9, 2015
1 parent 254245a commit 397865f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/java_buildpack/util/shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def shell(*args)
Open3.popen3(*args) do |_stdin, stdout, stderr, wait_thr|
if wait_thr.value != 0
puts "\nCommand '#{args.join ' '}' has failed"
puts "STDOUT: #{stdout.gets}"
puts "STDERR: #{stderr.gets}"
puts "STDOUT: #{stdout.gets nil}"
puts "STDERR: #{stderr.gets nil}"

fail
end
Expand Down

0 comments on commit 397865f

Please sign in to comment.