lib/minke/helpers/shell.rb in minke-1.13.5 vs lib/minke/helpers/shell.rb in minke-1.13.6
- old
+ new
@@ -8,18 +8,17 @@
##
# Executes a shell command and returns the return status
def execute command
@logger.debug command
- Open3.popen3(command) do |stdin, stdout, stderr, wait_thr|
- while line = stdout.gets
+ Open3.popen2e(command) do |stdin, stdout_err, wait_thr|
+ while line = stdout_err.gets
@logger.debug line
end
exit_status = wait_thr.value
unless exit_status.success?
- @logger.error "Error executing command: #{command}"
- abort
+ raise "Error executing command: #{command}"
end
end
end
def execute_and_return command
\ No newline at end of file