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:
Diffstat (limited to 'lib/gitlab/import_export/command_line_util.rb')
-rw-r--r--lib/gitlab/import_export/command_line_util.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb
index 924ca4e83ea..dfe0815f0a0 100644
--- a/lib/gitlab/import_export/command_line_util.rb
+++ b/lib/gitlab/import_export/command_line_util.rb
@@ -37,7 +37,7 @@ module Gitlab
def gzip_with_options(dir:, filename:, options: nil)
filepath = File.join(dir, filename)
- cmd = %W(gzip #{filepath})
+ cmd = %W[gzip #{filepath}]
cmd << "-#{options}" if options
_, status = Gitlab::Popen.popen(cmd)
@@ -68,6 +68,8 @@ module Gitlab
File.open(upload_path, 'wb') do |file|
current_size = 0
+ # When migrating from Gitlab::HTTP to Gitlab:HTTP_V2, we need to pass `extra_allowed_uris` as an option
+ # instead of `allow_object_storage`.
Gitlab::HTTP.get(url, stream_body: true, allow_object_storage: true) do |fragment|
if [301, 302, 303, 307].include?(fragment.code)
Gitlab::Import::Logger.warn(message: "received redirect fragment", fragment_code: fragment.code)
@@ -87,12 +89,12 @@ module Gitlab
end
def tar_with_options(archive:, dir:, options:)
- execute_cmd(%W(tar -#{options} #{archive} -C #{dir} .))
+ execute_cmd(%W[tar -#{options} #{archive} -C #{dir} .])
end
def untar_with_options(archive:, dir:, options:)
- execute_cmd(%W(tar -#{options} #{archive} -C #{dir}))
- execute_cmd(%W(chmod -R #{UNTAR_MASK} #{dir}))
+ execute_cmd(%W[tar -#{options} #{archive} -C #{dir}])
+ execute_cmd(%W[chmod -R #{UNTAR_MASK} #{dir}])
clean_extraction_dir!(dir)
end