Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix required env vars ignored except the last one
During the variable substitution, if a missing variable was followed by an existing one, the empty "outerErr" variable overwrote the previous non-empty variable. Unlike with Docker Compose v1, the first found error did not guarantee that an actual error would be thrown. Example which would have run before the fix even though var1 is not defined: ```yaml services: bash: image: bash:5.0.18-alpine3.15 environment: var12: "_ ${var1:?Error1} _ ${var2:?Error2} _ " command: - env ``` ```bash ``` This change also means that, if multiple variables are missing in one string, the first one will be reported by Docker Compose Signed-off-by: Ákos Takács <takacs.akos@it-sziget.hu>
- Loading branch information