summaryrefslogtreecommitdiff
path: root/app/presenters/packages/nuget/presenter_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/presenters/packages/nuget/presenter_helpers.rb')
-rw-r--r--app/presenters/packages/nuget/presenter_helpers.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/presenters/packages/nuget/presenter_helpers.rb b/app/presenters/packages/nuget/presenter_helpers.rb
index 09bf1e009a6..cd3e123033c 100644
--- a/app/presenters/packages/nuget/presenter_helpers.rb
+++ b/app/presenters/packages/nuget/presenter_helpers.rb
@@ -27,12 +27,19 @@ module Packages
end
def archive_url_for(package)
+ package_files = if Feature.enabled?(:packages_installable_package_files, default_enabled: :yaml)
+ package.installable_package_files
+ else
+ package.package_files
+ end
+
+ package_filename = package_files.with_format(NUGET_PACKAGE_FORMAT).last&.file_name
path = api_v4_projects_packages_nuget_download_package_name_package_version_package_filename_path(
{
id: package.project_id,
package_name: package.name,
package_version: package.version,
- package_filename: package.package_files.with_format(NUGET_PACKAGE_FORMAT).last&.file_name
+ package_filename: package_filename
},
true
)