compose-go/loader/include.go
Nicolas De Loof 08138d8f47 fix(loader): resolve the env_file and project_directory of a nested include against its declaring file
An include entry declared in a file that is itself included resolved its
relative env_file, and its relative project_directory, against the working
directory of the process. For the files of an included project the includer
only knows the directory its model is relative to, that of the project above,
which is right for the paths of the model, and was used as a path of the file
system to look for the env file.

Take the project directory of the including file from the local resource
loader set by the entry that included it, and lock the behavior with a suite
loading include trees from several working directories.

Fixes docker/compose#14488

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-13 10:40:28 +01:00

423 lines
13 KiB