mirror of
https://github.com/docker/compose.git
synced 2026-11-17 13:45:39 +00:00
The variable had three resolution mechanisms: up read it in PreRunE after the project's .env was injected into the process environment; down and kill read it at cobra-tree construction time — before that injection, so a value declared in the project's .env worked for up but not for them; create and run never read it at all. All five commands now resolve it through one helper, from PreRunE: explicit flag wins, then the process environment as completed by setEnvWithDotEnv from the local .env. create also gains the COMPOSE_IGNORE_ORPHANS handling (its ignoreOrphans field was sent to the API without ever being assigned) with the same conflict guard as up. setEnvWithDotEnv's remote-config exclusion is now documented as a product decision, not a technical constraint: COMPOSE_* variables exist so a local user doesn't repeat flags — they are the local user's choice, and a remote model must not steer the CLI consuming it. Unit tests pin the .env → process env → flag resolution order and the remote exclusion (epic #14074, D.1 and G.3). Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com> |
||
|---|---|---|
| .. | ||
| cmdtrace | ||
| compatibility | ||
| compose | ||
| display | ||
| formatter | ||
| prompt | ||
| main.go | ||