Commit a71d8e19 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'backup_restore_fix_issue_46891' into 'master'

Modify file restore to rectify tar issue

See merge request gitlab-org/gitlab-ce!24000
parents daae58d2 c74820db
---
title: Modify file restore to rectify tar issue
merge_request: 24000
author:
type: fixed
......@@ -71,8 +71,14 @@ module Backup
end
def run_pipeline!(cmd_list, options = {})
status_list = Open3.pipeline(*cmd_list, options)
raise Backup::Error, 'Backup failed' unless status_list.compact.all?(&:success?)
err_r, err_w = IO.pipe
options[:err] = err_w
status = Open3.pipeline(*cmd_list, options)
err_w.close
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