diff options
author | Frederic Van Espen <fes@escaux.com> | 2019-03-07 11:14:27 +0100 |
---|---|---|
committer | Frederic Van Espen <fes@escaux.com> | 2019-03-07 11:14:27 +0100 |
commit | 31dfc31aaa227224152f200b9fb961404a08fa40 (patch) | |
tree | 69f8e54ecf7a7205df5277ae997f0b1d8158835c /lib/backup/files.rb | |
parent | 562a1fc87d0269ce5fb1561fea45f8d01f4889de (diff) | |
parent | 5a75aa59dbafc8f0c25800f952df1e0aaa2d4dd5 (diff) | |
download | gitlab-ce-31dfc31aaa227224152f200b9fb961404a08fa40.tar.gz |
Merge branch 'master' into incremental-backups
Diffstat (limited to 'lib/backup/files.rb')
-rw-r--r-- | lib/backup/files.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/backup/files.rb b/lib/backup/files.rb index 427c65e2d91..098f2da6d88 100644 --- a/lib/backup/files.rb +++ b/lib/backup/files.rb @@ -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 |