Commit cd043fb
committed
fix: prevent nil map panic when docker-compose.yaml has top-level name field
When a docker-compose.yaml includes a top-level 'name:' field, the
compose-go loader attempts to assign to ConfigDetails.Environment which
is nil, causing a panic.
Initialize the Environment map to an empty map before calling the loader.
Fixes #29701 parent a91772b commit cd043fb
File tree
3 files changed
+14
-0
lines changed- pkg/devspace/compose
- testdata/named_project
3 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments