Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Colyer <jcolyer2007@gmail.com>2019-01-09 19:44:26 +0300
committerJason Colyer <jcolyer2007@gmail.com>2019-01-17 19:07:06 +0300
commit99b6f37fa525b1a19cccfe743d4f56d104c02c78 (patch)
treee60a91f0dcd8a26805049cb5caf47fe0f2d69f0f /lib/backup
parent8da36a4505eda991946c328813ab35d73bad8369 (diff)
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
Diffstat (limited to 'lib/backup')
-rw-r--r--lib/backup/files.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/backup/files.rb b/lib/backup/files.rb
index 31ef354ebb8..48cb01b5b82 100644
--- a/lib/backup/files.rb
+++ b/lib/backup/files.rb
@@ -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|
- err_w.close
- threads.collect { |t| status.push(t.value) }
- end
+ status = Open3.pieline(*cmd_list, options)
+ err_w.close
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