mirror of
https://github.com/kemko/paperclip.git
synced 2026-01-06 10:25:40 +03:00
Merge pull request #38 from insales/fix_system_command_hanging
Запускаем системные команды с таймаутом 30с
This commit is contained in:
@@ -107,7 +107,7 @@ module Paperclip
|
||||
command = %Q<#{%Q[#{path_for_command(cmd)} #{params}].gsub(/\s+/, " ")}>
|
||||
command = "#{command} 2>#{bit_bucket}" if Paperclip.options[:swallow_stderr]
|
||||
Paperclip.log(command) if Paperclip.options[:log_command]
|
||||
output = `#{command}`
|
||||
output = `timeout 30 #{command}`
|
||||
unless [expected_outcodes].flatten.include?($?.exitstatus)
|
||||
raise PaperclipCommandLineError, "Error while running #{cmd}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user