From 397865f25e65203bab9bd8ad605071b141c8986f Mon Sep 17 00:00:00 2001 From: Christopher Frost Date: Thu, 9 Apr 2015 17:48:40 +0100 Subject: [PATCH] Fix long time bug in shell commands 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. --- lib/java_buildpack/util/shell.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/java_buildpack/util/shell.rb b/lib/java_buildpack/util/shell.rb index 83222d96f2..ed4a654774 100644 --- a/lib/java_buildpack/util/shell.rb +++ b/lib/java_buildpack/util/shell.rb @@ -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