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.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb
index 3da9083e743..e520cade517 100644
--- a/lib/gitlab/import_export/command_line_util.rb
+++ b/lib/gitlab/import_export/command_line_util.rb
@@ -81,20 +81,20 @@ module Gitlab
return true if status == 0
+ output = output&.strip
+ message = "command exited with error code #{status}"
+ message += ": #{output}" if output.present?
+
if @shared.respond_to?(:error)
- @shared.error(Gitlab::ImportExport::Error.new(output.to_s))
+ @shared.error(Gitlab::ImportExport::Error.new(message))
false
else
- raise Gitlab::ImportExport::Error, 'System call failed'
+ raise Gitlab::ImportExport::Error, message
end
end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
- def git_bin_path
- Gitlab.config.git.bin_path
- end
-
def copy_files(source, destination)
# if we are copying files, create the destination folder
destination_folder = File.file?(source) ? File.dirname(destination) : destination