compose/cmd
Nicolas De Loof ac7791c2f7 fix: COMPOSE_REMOVE_ORPHANS resolves identically for every command carrying the flag
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>
2026-11-16 16:33:23 +01:00
..
cmdtrace feat(tracing): surface otel shutdown errors via --debug 2026-09-02 17:12:12 +02:00
compatibility modernize some code 2026-02-12 15:31:35 +01:00
compose fix: COMPOSE_REMOVE_ORPHANS resolves identically for every command carrying the flag 2026-11-16 16:33:23 +01:00
display refactor(compose): use a single event processor that discards events 2026-10-29 11:59:43 +01:00
formatter chore: address the review notes left 2026-11-11 20:43:01 +01:00
prompt cmd/prompt: remove uses of github.com/AlecAivazis/survey/v2 2026-09-11 15:30:07 +02:00
main.go refactor(up): inject the navigation menu instead of importing cmd/formatter 2026-10-12 10:50:38 +02:00