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-15 20:51:41 +0300
committerJason Colyer <jcolyer2007@gmail.com>2019-01-17 19:07:29 +0300
commitf88b464bf3bfa13dea33489d8f57e5380dbc00cd (patch)
tree8862ac85551609e6917355589bdc936897a45d83
parent99b6f37fa525b1a19cccfe743d4f56d104c02c78 (diff)
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
-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 48cb01b5b82..550c932b2b5 100644
--- a/lib/backup/files.rb
+++ b/lib/backup/files.rb
@@ -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