Commit 99b6f37f authored by Jason Colyer's avatar Jason Colyer

Modify file restore to rectify tar issue

Changed run_pipeline! function to have use $ in regex
Changed run_pipeline! function to use Open3.pipeline
instead of Open3.pipeline_start
parent 8da36a45
......@@ -73,13 +73,11 @@ module Backup
def run_pipeline!(cmd_list, options = {})
err_r, err_w = IO.pipe
options[:err] = err_w
status = []
Open3.pipeline_start(*cmd_list, options) do |threads|
status = Open3.pieline(*cmd_list, options)
err_w.close
threads.collect { |t| status.push(t.value) }
end
unless status.compact.all?(&:success?)
unless err_r.read =~ /^g?tar: \.: Cannot mkdir: No such file or directory/
error = err_r.read
unless error =~ /^g?tar: \.: Cannot mkdir: No such file or directory$/
raise Backup::Error, 'Backup failed'
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment