lib/liberty_buildpack/services/compose_mongo.rb
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 nil}"
          puts "STDERR: #{stderr.gets nil}"

          raise
        end
      end
    end
# A +system()+-like command that ensure that the execution fails if the command returns a non-zero exit code
#
# @param [Object] args The command to run
# @return [Void]
A +system()+-like command that ensure that the execution fails if the command returns a non-zero exit code
A + system () + - like command that ensure that the execution fails if the command returns a non - zero exit code
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 nil}"
          puts "STDERR: #{stderr.gets nil}"
          raise
        end
      end
    end
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 nil}" puts "STDERR: #{stderr.gets nil}" raise end end end
A +system()+-like command that ensure that the execution fails if the command returns a non-zero exit code
A + system () + - like command that ensure that the execution fails if the command returns a non - zero exit code
None
Void
args
args The command to run
args The command to run