Commit f4f3490
committed
fix: always write devcontainer.metadata label as JSON array
When there is only one metadata entry (e.g. docker-compose devcontainer
with no features), `getDevcontainerMetadataLabel` wrote a bare JSON
object instead of an array. This violates the spec which states the
label "can contain an array of json snippets" and causes tools like Zed
that expect an array to fail when attaching to an existing container.
Always wrap the metadata in an array regardless of the number of entries.
Spec reference: https://containers.dev/implementors/json_reference/
Fixes #10541 parent 997a2db commit f4f3490
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
505 | 503 | | |
506 | 504 | | |
507 | 505 | | |
| |||
0 commit comments