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
This commit is contained in:
parent
99b6f37fa5
commit
f88b464bf3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue