Skip to content

Commit 397865f

Browse files
author
Christopher Frost
committed
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.
1 parent 254245a commit 397865f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/java_buildpack/util/shell.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def shell(*args)
3131
Open3.popen3(*args) do |_stdin, stdout, stderr, wait_thr|
3232
if wait_thr.value != 0
3333
puts "\nCommand '#{args.join ' '}' has failed"
34-
puts "STDOUT: #{stdout.gets}"
35-
puts "STDERR: #{stderr.gets}"
34+
puts "STDOUT: #{stdout.gets nil}"
35+
puts "STDERR: #{stderr.gets nil}"
3636

3737
fail
3838
end

0 commit comments

Comments
 (0)