Commit 3c89a788 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix/import-export-log' into 'master'

Fix log statements in import/export

Fixes - as seen in the logs:
```
Import/Export error raised on /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/import_export/file_importer.rb:19:in `rescue in import': undefined method `message' for #<String:0x007fc45e977e10>
```

See merge request !5129
parents ecfbb963 91a183bc
Pipeline #3662626 passed with stages
in 1092 minutes and 8 seconds
......@@ -29,7 +29,7 @@ module Gitlab
def execute(cmd)
output, status = Gitlab::Popen.popen(cmd)
@shared.error(output.to_s) unless status.zero?
@shared.error(Gitlab::ImportExport::Error.new(output.to_s)) unless status.zero?
status.zero?
end
......
......@@ -17,7 +17,7 @@ module Gitlab
Rails.logger.info("Saved project export #{archive_file}")
archive_file
else
@shared.error("Unable to save #{archive_file} into #{@shared.export_path}")
@shared.error(Gitlab::ImportExport::Error.new("Unable to save #{archive_file} into #{@shared.export_path}"))
false
end
rescue => e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment