Files
Giteabotandrafał przypek d0e8294f46 fix(packages): return empty Chef dependencies instead of null (#40237) (#40242)
Backport #40237 by @Shadow0Bit

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).

Co-authored-by: rafał przypek <58443512+Shadow0Bit@users.noreply.github.com>
2026-11-05 19:03:52 +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