-
Notifications
You must be signed in to change notification settings - Fork 534
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
If you pass multiple compoe files (multiple -f
) the files get merged in the wrong order.
This only happens if the file which includes other files are not at the last position.
To Reproduce
We need a project containing of multiple compose files like
/dev.yml
/dev/db.yml
/foo.yml
# /dev.yml
include:
- ./dev/db.yml
# /dev/db.yml
services:
db:
image: ubuntu
# /foo.yml
services:
db:
image: debian
Steps to reproduce the behavior:
- call `podman-compose -f dev.yml -f foo.yml config
Expected behavior
The service db
should have image: debian
.
Actual behavior
The service db
should have image: debian
.
Additional context
The problem is that includes files are just appended to the list of files. But it should be inserted into the files list after the current processing file!
So the file list looks like
[
"/dev.yml", # first cmd parameter
"/foo.yml", # second cmd parameter
"/dev/db.yml" # the file included in /dev.yml
]
But it should look like
[
"/dev.yml", # first cmd parameter
"/dev/db.yml" # the file(s) included in /dev.yml
"/foo.yml", # next cmd parameter
]
lisongmin
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working