diff --git a/lib/tasks/compact_index.rake b/lib/tasks/compact_index.rake index 7c976784d5d..e978d07bd5c 100644 --- a/lib/tasks/compact_index.rake +++ b/lib/tasks/compact_index.rake @@ -91,9 +91,9 @@ namespace :compact_index do end desc "Generate/update the versions.list file" - task update_versions_file: :environment do - file_path = Rails.application.config.rubygems['versions_file_location'] - versions_file = CompactIndex::VersionsFile.new file_path + task :update_versions_file, [:file_path] => :environment do |_t, args| + raise "#{args[:file_path]} does not exist" unless File.exist?(args[:file_path]) + versions_file = CompactIndex::VersionsFile.new args[:file_path] # Only indexed versions of a gem go into *new* versions file query = ["SELECT r.name, v.created_at as date, v.info_checksum, v.number, v.platform