Files
gitea-MIRROR/modules/util
rafał przypek 3b9b8a8976 fix(packages): return empty Chef dependencies instead of null (#40237)
Fixes #40230

Cookbooks without dependencies are served with `"dependencies": null`
from the universe and version metadata endpoints. This happens because
`omitempty` drops the empty map when the metadata is stored. Chef
clients iterate over this value and Policyfile resolution crashes.

Supermarket returns `{}` for these cookbooks, Gitea now does too. The
fix checks whether dependencies are `nil` while building response,
returns an empty map if true. This way cookbooks that are already stored
are covered without a re-upload.

Tested with the Chef integration test and `chef-cli install`.

Assisted by Claude Code (claude-opus-5-5).
2026-11-05 15:19:09 +00:00
..
2026-10-24 13:48:19 +00:00
2024-06-11 18:47:45 +00:00
2023-07-04 18:36:08 +00:00
2023-05-08 19:49:59 +08:00
2025-07-30 07:08:59 +00:00