diff options
Diffstat (limited to 'app/services/packages/rubygems/process_gem_service.rb')
-rw-r--r-- | app/services/packages/rubygems/process_gem_service.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/services/packages/rubygems/process_gem_service.rb b/app/services/packages/rubygems/process_gem_service.rb index 59bf2a1ec28..109c87a0444 100644 --- a/app/services/packages/rubygems/process_gem_service.rb +++ b/app/services/packages/rubygems/process_gem_service.rb @@ -16,6 +16,7 @@ module Packages end def execute + raise ExtractionError, 'Gem was not processed - package_file is not set' unless package_file return success if process_gem error('Gem was not processed') @@ -26,8 +27,6 @@ module Packages attr_reader :package_file def process_gem - return false unless package_file - try_obtain_lease do package.transaction do rename_package_and_set_version @@ -106,8 +105,8 @@ module Packages Packages::PackageFile.find(package_file.id).file.use_file do |file_path| Gem::Package.new(File.open(file_path)) end - rescue - raise ExtractionError.new('Unable to read gem file') + rescue StandardError + raise ExtractionError, 'Unable to read gem file' end # used by ExclusiveLeaseGuard |