Commit f88b464b authored by Jason Colyer's avatar Jason Colyer

Modify file restore to rectify tar issue

Adjusted run_pipeline! function
  to match rubocop syntax requirements
Adjusted run_pipeline! function
  to use variable instead of string interpolation
parent 99b6f37f
......@@ -75,12 +75,10 @@ module Backup
options[:err] = err_w
status = Open3.pieline(*cmd_list, options)
err_w.close
unless status.compact.all?(&:success?)
error = err_r.read
unless error =~ /^g?tar: \.: Cannot mkdir: No such file or directory$/
raise Backup::Error, 'Backup failed'
end
end
return if status.compact.all?(&:success?)
regex = /^g?tar: \.: Cannot mkdir: No such file or directory$/
raise Backup::Error, 'Backup failed' unless err_r.read =~ regex
end
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